Skip to content

Commit

Permalink
Type-annotate / add docs to batch.py
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 318172676
  • Loading branch information
romanngg committed Jun 25, 2020
1 parent 644ca30 commit bd0e56a
Show file tree
Hide file tree
Showing 5 changed files with 275 additions and 194 deletions.
6 changes: 3 additions & 3 deletions neural_tangents/stax.py
Original file line number Diff line number Diff line change
Expand Up @@ -2258,7 +2258,7 @@ def _get_diagonal_outer_prods(cov1: np.ndarray,
axis: Tuple[int, ...] = (),
mask1: Optional[np.ndarray] = None,
mask2: Optional[np.ndarray] = None
) -> Tuple[np.ndarray, np.ndarray, np.ndarray]:
) -> Tuple[np.ndarray, np.ndarray, np.ndarray]:
"""Gets outer products of diagonals `cov1, cov1`, `cov1, cov2`, `cov2, cov2`.
`prod11[x1, x2, h1, h2, ...]` =
Expand Down Expand Up @@ -2460,8 +2460,8 @@ def _transform_kernels(
if fn is _sin:
return _transform_kernels_sin(k, **fn_kwargs)
# TODO(xlc): Monte Carlo approximation to the integral (suggested by schsam@.)
raise NotImplementedError('Analaytic kernel for activiation {} is not '
'implmented'.format(fn))
raise NotImplementedError(f'Analaytic kernel for activiation {fn} is not '
f'implmented.')


def _affine(
Expand Down

0 comments on commit bd0e56a

Please sign in to comment.