Skip to content

Commit 0f5a06d

Browse files
committed
Use Scan.L_op instead of Scan.grad() to help speed up the second derivative
1 parent 7c22fa2 commit 0f5a06d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

theano/scan_module/scan_op.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1931,8 +1931,7 @@ def get_oinp_iinp_iout_oout_mappings(self):
19311931
return mappings
19321932

19331933
# GRAD FUNCTION
1934-
def grad(self, inputs, dC_douts):
1935-
outs = self(*inputs)
1934+
def L_op(self, inputs, outs, dC_douts):
19361935
if not isinstance(outs, (list, tuple)):
19371936
outs = [outs]
19381937
# `grad_step` equals the number of steps the original scan node has

0 commit comments

Comments
 (0)