Utils

snngrow.base.utils.make_tuple(x: Union[int, List[int], Tuple[int, ...], Tensor], ndim: int, name: str) Tuple[int, ...]

Make an n-tuple from the input.

Parameters:
  • x – The input value.

  • ndim – The desired dimension of the tuple.

  • name – The name of the input value.

Returns:

The n-tuple.

snngrow.base.utils.reset(net: Module)
Parameters:

net – Any network inherits from nn.Module

Returns:

None

Reset neurons in the network.