Skip to content

Commit f603544

Browse files
committed
Use dde.grad
1 parent f8fdea3 commit f603544

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

examples/Euler_beam.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010

1111
def main():
1212
def ddy(x, y):
13-
dy_x = tf.gradients(y, x)[0]
14-
return tf.gradients(dy_x, x)[0]
13+
return dde.grad.hessian(y, x)
1514

1615
def dddy(x, y):
1716
return tf.gradients(ddy(x, y), x)[0]

0 commit comments

Comments
 (0)