We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6afa4a commit 1604348Copy full SHA for 1604348
deepxde/backend/paddle/tensor.py
@@ -59,6 +59,8 @@ def reshape(tensor, shape):
59
60
61
def Variable(initial_value, dtype=None):
62
+ if paddle.in_dynamic_mode():
63
+ return paddle.to_tensor(initial_value, dtype=dtype, stop_gradient=False)
64
return paddle.create_parameter(
65
shape=[1],
66
dtype=paddle.get_default_dtype() if dtype is None else dtype,
0 commit comments