Some problems need help! #1637
Unanswered
ruzhongliang
asked this question in
Q&A
Replies: 2 comments
-
I also encounter the second problem, do you have a solution? |
Beta Was this translation helpful? Give feedback.
0 replies
-
The example doesn't support pytorch backend. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I learn the code Demos of Function Approximation
using pycharm+conda python 3.10.
Q1:
D:\ProgramData\anaconda3\envs\py310nn\python.exe D:\py_test\deepxde\pythonProject1\function_approximation.py
Using backend: pytorch
Other supported backends: tensorflow.compat.v1, tensorflow, jax, paddle.
paddle supports more examples now and is recommended.
Traceback (most recent call last):
File "D:\py_test\deepxde\pythonProject1\function_approximation.py", line 21, in
net = dde.nn.FNN([1] + [20] * 3 + [1], activation, initializer)
TypeError: FNN() missing 2 required positional arguments: 'regularization' and 'dropout_rate'
Process finished with exit code 1
Q2:
https://github.com/lululxvi/deepxde/blob/master/examples/function/func_uncertainty.py
Using backend: pytorch
Other supported backends: tensorflow.compat.v1, tensorflow, jax, paddle.
paddle supports more examples now and is recommended.
Compiling model...
Traceback (most recent call last):
File "D:\py_test\deepxde\pythonProject1\func_uncertainty.py", line 34, in
model.compile("adam", lr=0.001, metrics=["l2 relative error"])
File "D:\ProgramData\anaconda3\envs\py310nn\lib\site-packages\deepxde\utils\internal.py", line 22, in wrapper
result = f(*args, **kwargs)
File "D:\ProgramData\anaconda3\envs\py310nn\lib\site-packages\deepxde\model.py", line 141, in compile
self._compile_pytorch(lr, loss_fn, decay)
File "D:\ProgramData\anaconda3\envs\py310nn\lib\site-packages\deepxde\model.py", line 329, in _compile_pytorch
list(self.net.parameters()) + self.external_trainable_variables
AttributeError: 'NoneType' object has no attribute 'parameters'
Process finished with exit code 1
Beta Was this translation helpful? Give feedback.
All reactions