File tree 2 files changed +6
-6
lines changed 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -638,6 +638,7 @@ def L_op(
638
638
# will be DisconnectedType, which have type(Variable). Matrices that are on the backwards compute path
639
639
# have type TensorVariable. Thus, we replace Variables with zero matrices of the correct shapes.
640
640
new_output_grads = []
641
+
641
642
for output_grad , output in zip (output_grads , outputs ):
642
643
if not isinstance (output_grad , ptb .TensorVariable ):
643
644
new_output_grads .append (ptb .zeros_like (output ))
Original file line number Diff line number Diff line change @@ -273,12 +273,11 @@ def svd_fn(A, case=0):
273
273
elif case == 6 :
274
274
return U .sum () + s .sum () + V .sum ()
275
275
276
- for case in range (7 ):
277
- utt .verify_grad (
278
- partial (svd_fn , case = gradient_test_case ),
279
- [A_v ],
280
- rng = rng ,
281
- )
276
+ utt .verify_grad (
277
+ partial (svd_fn , case = gradient_test_case ),
278
+ [A_v ],
279
+ rng = rng ,
280
+ )
282
281
283
282
else :
284
283
utt .verify_grad (
You can’t perform that action at this time.
0 commit comments