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 45fdd38 commit a2ad791Copy full SHA for a2ad791
ppsci/autodiff/ad.py
@@ -136,9 +136,7 @@ def __call__(
136
self.Js[key] = _Jacobian(ys, xs)
137
return self.Js[key](i, j, retain_graph, create_graph)
138
else:
139
- xs_require: List["paddle.Tensor"] = [
140
- xs[i] for i in range(len(xs)) if (ys, xs[i]) not in self.Js
141
- ]
+ xs_require = [xs[i] for i in range(len(xs)) if (ys, xs[i]) not in self.Js]
142
grads_require = paddle.grad(
143
ys,
144
xs_require,
0 commit comments