block#

Module Contents#

ResBlock

Simple MLP block with residual connection.

_get_activation_fn(activation)

_get_activation_fn(activation)#
class ResBlock(in_features, out_features, activation='relu')#

Bases: torch.nn.Module

Simple MLP block with residual connection.

Parameters:
  • in_features – the feature dimension of each output sample.

  • out_features – the feature dimension of each output sample.

  • activation – the activation function of intermediate layer, relu or gelu.

forward(x)#