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 3da1e28 commit dce4b10Copy full SHA for dce4b10
deepxde/gradients/gradients.py
@@ -30,7 +30,9 @@ def jacobian(ys, xs, i=None, j=None):
30
unless J has only one element, which is returned.
31
32
Returns:
33
- (`i`, `j`)th entry J[`i`, `j`], `i`th row J[`i`, :], or `j`th column J[:, `j`].
+ (`i`, `j`)th entry J[`i`, `j`], `i`th row J[`i`, :], or `j`th column J[:, `j`],
34
+ with 2 dimension when ys of shape (batch_size, dim_y) or 3 dimension when
35
+ ys of shape (batch_size_out, batch_size, dim_y).
36
"""
37
if config.autodiff == "reverse":
38
return gradients_reverse.jacobian(ys, xs, i=i, j=j)
@@ -59,7 +61,8 @@ def hessian(ys, xs, component=0, i=0, j=0):
59
61
j (int): `j`th column.
60
62
63
- H[`i`, `j`].
64
+ H[`i`, `j`], with 2 dimension when ys of shape (batch_size, dim_y)
65
+ or 3 dimension when ys of shape (batch_size_out, batch_size, dim_y).
66
67
68
return gradients_reverse.hessian(ys, xs, component=component, i=i, j=j)
0 commit comments