Replies: 1 comment
-
The error is very clear. You need to use numpy array, not tf tensor. |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Dear Prof.Lu and Community members,
I need do solve a mechanical problem with equilibrium equation. And I used OperatorBC to define the Neumann Condition beacuse of the complication. And if I use "normal=geom.boundary_normal(x)", i will get some errors. But when i rund the tutorial document " Helmholtz equation over a 2D square domain with a hole", everythings is good. Could you give me some idea?
My computer has :Tensorflow 2.11
Numpy 1.24
And this is error
File "/test.py", line 183, in resultat
normal=geom.boundary_normal(x)
File "/.local/lib/python3.9/site-packages/deepxde/geometry/geometry_2d.py", line 41, in boundary_normal
l = np.linalg.norm(_n, axis=-1, keepdims=True)
File "<array_function internals>", line 200, in norm
File "/.local/lib/python3.9/site-packages/numpy/linalg/linalg.py", line 2493, in norm
x = asarray(x)
File "/.local/lib/python3.9/site-packages/tensorflow/python/framework/ops.py", line 922, in array
raise NotImplementedError(
NotImplementedError: Cannot convert a symbolic tf.Tensor (sub_13: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.
Thanks for your answers
Beta Was this translation helpful? Give feedback.
All reactions