Skip to content

Commit

Permalink
[DOC] Show supported layers in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
f-dangel committed Oct 30, 2023
1 parent 7161f21 commit 5190c9f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion curvlinops/kfac.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,10 @@ def _hook_accumulate_gradient_covariance(
covariance = einsum("bi,bj->ij", g, g).mul_(correction)
else:
# TODO Support convolutions
raise NotImplementedError(f"Layer of type {type(module)} is unsupported.")
raise NotImplementedError(
f"Layer of type {type(module)} is unsupported. "
+ f"Supported layers: {self._SUPPORTED_MODULES}."
)

idx = tuple(p.data_ptr() for p in module.parameters())
if idx not in self._gradient_covariances:
Expand Down

0 comments on commit 5190c9f

Please sign in to comment.