Skip to content

Commit

Permalink
Support Python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
runame committed Aug 7, 2024
1 parent 141bf72 commit 93b2bc1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion test/test_inverse.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,5 +737,6 @@ def test_torch_matvec_list_output_shapes(cnn_case):
inv_kfac = KFACInverseLinearOperator(kfac, damping=1e-2)
vec = [torch.rand_like(p) for p in kfac._params]
out_list = inv_kfac.torch_matvec(vec)
for out_i, p_i in zip(out_list, kfac._params, strict=True):
assert len(out_list) == len(kfac._params)
for out_i, p_i in zip(out_list, kfac._params):
assert out_i.shape == p_i.shape
3 changes: 2 additions & 1 deletion test/test_kfac.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,8 @@ def test_torch_matvec_list_output_shapes(cnn_case):
)
vec = [rand_like(p) for p in kfac._params]
out_list = kfac.torch_matvec(vec)
for out_i, p_i in zip(out_list, kfac._params, strict=True):
assert len(out_list) == len(kfac._params)
for out_i, p_i in zip(out_list, kfac._params):
assert out_i.shape == p_i.shape


Expand Down

0 comments on commit 93b2bc1

Please sign in to comment.