deepxde icon indicating copy to clipboard operation
deepxde copied to clipboard

How can I choose a specific backend?

Open haloproof opened this issue 1 year ago • 3 comments

I have several available backends (tensorflow.compat.v1, pytorch, etc.), but how to choose a specific one? When I run my program it selects tensorflow.compat.v1 by default, but I want to use pytorch.

haloproof avatar Sep 11 '23 06:09 haloproof

Use the DDE_BACKEND environment variable:

https://deepxde.readthedocs.io/en/latest/user/installation.html#working-with-different-backends

samuelburbulla avatar Sep 11 '23 07:09 samuelburbulla

thank you for your help, I have succeeded!

haloproof avatar Sep 11 '23 11:09 haloproof

import os

os.environ['DDE_BACKEND'] = 'tensorflow.compat.v1' print(os.getenv('DDE_BACKEND'))

lxciwhr avatar Sep 28 '23 02:09 lxciwhr