-
|
Such as Richards equation:
my code: Traceback (most recent call last): File ~\anaconda3\lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec File c:\users\37601\onedrive\桌面\pinn\unsat2d.py:88 File ~\anaconda3\lib\site-packages\deepxde\utils\internal.py:22 in wrapper File ~\anaconda3\lib\site-packages\deepxde\model.py:132 in compile File ~\anaconda3\lib\site-packages\deepxde\model.py:181 in _compile_tensorflow_compat_v1 File ~\anaconda3\lib\site-packages\deepxde\model.py:167 in losses File ~\anaconda3\lib\site-packages\deepxde\data\data.py:13 in losses_train File ~\anaconda3\lib\site-packages\deepxde\data\pde.py:140 in losses File c:\users\37601\onedrive\桌面\pinn\unsat2d.py:23 in pde File ~\anaconda3\lib\site-packages\tensorflow\python\util\traceback_utils.py:153 in error_handler File ~\anaconda3\lib\site-packages\tensorflow\python\framework\ops.py:1751 in _create_c_op ValueError: Shape must be rank 0 but is rank 2 for '{{node cond_1/Switch}} = Switch[T=DT_BOOL](Less_2, Less_2)' with input shapes: [?,1], [?,1]. try to use File ~\anaconda3\lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec File c:\users\37601\onedrive\桌面\pinn\unsat2d.py:98 File ~\anaconda3\lib\site-packages\deepxde\utils\internal.py:22 in wrapper File ~\anaconda3\lib\site-packages\deepxde\model.py:132 in compile File ~\anaconda3\lib\site-packages\deepxde\model.py:181 in _compile_tensorflow_compat_v1 File ~\anaconda3\lib\site-packages\deepxde\model.py:167 in losses File ~\anaconda3\lib\site-packages\deepxde\data\data.py:13 in losses_train File ~\anaconda3\lib\site-packages\deepxde\data\pde.py:140 in losses File c:\users\37601\onedrive\桌面\pinn\unsat2d.py:41 in pde File c:\users\37601\onedrive\桌面\pinn\unsat2d.py:34 in ex_func File ~\anaconda3\lib\site-packages\scipy\interpolate_rbf.py:280 in call File ~\anaconda3\lib\site-packages\scipy\interpolate_rbf.py:280 in File ~\anaconda3\lib\site-packages\tensorflow\python\framework\ops.py:836 in array NotImplementedError: Cannot convert a symbolic tf.Tensor (mul_5:0) to a numpy array. This error may indicate that you're trying to pass a Tensor to a NumPy call, which is not supported. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Just implement the function using TensorFlow/PyTorch. |
Beta Was this translation helpful? Give feedback.
-
So how has it exactly been solved? Could you offer your code snippet with success? |
Beta Was this translation helpful? Give feedback.
Just implement the function using TensorFlow/PyTorch.