Skip to content

Commit

Permalink
[FIX] Typos
Browse files Browse the repository at this point in the history
  • Loading branch information
f-dangel committed Feb 14, 2024
1 parent 29617a8 commit 7403885
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions curvlinops/kfac.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def _matmat(self, M: ndarray) -> ndarray:
Matrix-multiplication result ``KFAC @ M``. Has shape ``[D, K]``.
Raises:
ValueError: If the incoming matrix was not fully processed, indicating an
RuntimeError: If the incoming matrix was not fully processed, indicating an
error due to the internal mapping from parameters to modules.
"""
# Need to update parameter mapping if they have changed (e.g. device
Expand All @@ -259,7 +259,7 @@ def _matmat(self, M: ndarray) -> ndarray:
self._input_covariances, self._gradient_covariances = {}, {}

if not self._input_covariances and not self._gradient_covariances:
self._compute_and_cache_kfac()
self._compute_kfac()

M_torch = super()._preprocess(M)
processed = set()
Expand Down Expand Up @@ -326,7 +326,7 @@ def _adjoint(self) -> KFACLinearOperator:
"""
return self

def _compute_and_cache_kfac(self):
def _compute_kfac(self):
"""Compute and cache KFAC's Kronecker factors for future ``matvec``s."""
# install forward and backward hooks
hook_handles: List[RemovableHandle] = []
Expand Down

0 comments on commit 7403885

Please sign in to comment.