block ===== .. py:module:: topmost.models.hierarchical.SawETM.block Module Contents --------------- .. autoapisummary:: topmost.models.hierarchical.SawETM.block.ResBlock .. autoapisummary:: topmost.models.hierarchical.SawETM.block._get_activation_fn .. py:function:: _get_activation_fn(activation) .. py:class:: ResBlock(in_features, out_features, activation='relu') Bases: :py:obj:`torch.nn.Module` Simple MLP block with residual connection. :param in_features: the feature dimension of each output sample. :param out_features: the feature dimension of each output sample. :param activation: the activation function of intermediate layer, relu or gelu. .. py:attribute:: in_features .. py:attribute:: out_features .. py:attribute:: fc1 .. py:attribute:: fc2 .. py:attribute:: bn .. py:attribute:: activation .. py:method:: forward(x)