V1

Model definition used in the Sîmpetru et al. (2022)

class doc_octopy.models.definitions.raul_net.offline.v1.CircularPad[source]

Circular padding layer

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

forward(x)[source]

Define 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.

Return type:

Tensor

class doc_octopy.models.definitions.raul_net.offline.v1.ErfAct_2(gamma=1.0, sigma=1.25)[source]

ErfAct_2 activation function from Biswas et al.

References

Biswas, K., Kumar, S., Banerjee, S., Pandey, A.K., 2021. ErfAct and PSerf: Non-monotonic smooth trainable Activation Functions. arXiv:2109.04386 [cs].

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

forward(x)[source]

Define 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.

Return type:

Tensor

class doc_octopy.models.definitions.raul_net.offline.v1.RaulNetV1(example_input_array, learning_rate, nr_of_input_channels, nr_of_outputs, cnn_encoder_channels, mlp_encoder_channels, event_search_kernel_length, event_search_kernel_stride)[source]

Model definition used in Sîmpetru et al. [1]

Parameters:
  • example_input_array (Tensor)

  • learning_rate (float)

  • nr_of_input_channels (int)

  • nr_of_outputs (int)

  • cnn_encoder_channels (Tuple[int, int, int])

  • mlp_encoder_channels (Tuple[int, int])

  • event_search_kernel_length (int)

  • event_search_kernel_stride (int)

example_input_array

Used for creating a summery and checking if the model architecture is valid.

Type:

torch.Tensor

learning_rate

The learning rate.

Type:

float

nr_of_input_channels

The number of input channels. In Sîmpetru et al. 2.

Type:

int

nr_of_outputs

The number of outputs. In Sîmpetru et al. 14 DOFs.

Type:

int

cnn_encoder_channels

Tuple containing 3 integers defining the cnn encoder channels.

Type:

Tuple[int, int, int]

mlp_encoder_channels

Tuple containing 2 integers defining the mlp encoder channels.

Type:

Tuple[int, int]

event_search_kernel_length

Integer that sets the length of the kernels searching for action potentials.

Type:

int

event_search_kernel_stride

Integer that sets the stride of the kernels searching for action potentials.

Type:

int

Notes

forward(inputs)[source]

Same as torch.nn.Module.forward.

Parameters:
  • *args – Whatever you decide to pass into the forward method.

  • **kwargs – Keyword arguments are also possible.

Returns:

Your model’s output

Return type:

Tensor