Skip to content

Commit

Permalink
Minor docstring fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
runame committed Nov 7, 2023
1 parent 9722fa8 commit 2de2ba9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions curvlinops/kfac.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,14 @@ def __init__(
from the model's predictive distribution. Defaults to ``2147483647``.
fisher_type: The type of Fisher/GGN to approximate. If ``'type-2'``, the
expectation over the model outputs is computed exactly by
computing the backwward pass for each output dimension. This is
computing the backward pass for each output dimension. This is
sometimes also called type-2 Fisher. If ``'mc'``, the expectation
is approximated by sampling ``mc_samples`` labels from the model's
predictive distribution. If ``'empirical'``, the empirical gradients
are used which corresponds to the uncentered gradient covariance, or
the empirical Fisher. Defaults to ``'mc'``.
mc_samples: The number of Monte-Carlo samples to use per data point.
Will be ignored when ``fisher_type`` is not ``'mc'``.
Defaults to ``1``.
Raises:
Expand Down Expand Up @@ -226,7 +227,6 @@ def _compute_kfac(self):
NotImplementedError: If ``fisher_type == 'type-2'``.
ValueError: If ``fisher_type`` is not ``'type-2'``, ``'mc'``, or
``'empirical'``.
"""
# install forward and backward hooks
hook_handles: List[RemovableHandle] = []
Expand Down

0 comments on commit 2de2ba9

Please sign in to comment.