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.

参数:
  • x – The input value.

  • ndim – The desired dimension of the tuple.

  • name – The name of the input value.

返回:

The n-tuple.

snngrow.base.utils.reset(net: Module)
参数:

net – Any network inherits from nn.Module

返回:

None

Reset neurons in the network.