norse.torch.models.conv module

class norse.torch.models.conv.ConvNet(num_channels=1, feature_size=28, method='super', dtype=torch.float32)[source]

Bases: torch.nn.modules.module.Module

A convolutional network with LIF dynamics

Parameters
  • num_channels (int) – Number of input channels

  • feature_size (int) – Number of input features

  • method (str) – Threshold method

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(x)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool
class norse.torch.models.conv.ConvNet4(num_channels=1, feature_size=28, method='super', dtype=torch.float32)[source]

Bases: torch.nn.modules.module.Module

A convolutional network with LIF dynamics

Parameters
  • num_channels (int) – Number of input channels

  • feature_size (int) – Number of input features

  • method (str) – Threshold method

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(x)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool