emmi.modules.encoder.mlp_encoder ================================ .. py:module:: emmi.modules.encoder.mlp_encoder Classes ------- .. autoapisummary:: emmi.modules.encoder.mlp_encoder.MlpEncoder Module Contents --------------- .. py:class:: MlpEncoder(input_dim, hidden_dim, init_weights='truncnormal002') Bases: :py:obj:`torch.nn.Module` A 2-layer MLP encoder. Can be use to encode (i.e., embed) the input data. Initialize the MlpEncoder. :param input_dim: Number of dimensions of the input tensor. :param hidden_dim: Hidden dimensionality of the network. :param init_weights: Initialization method for the weight matrixes of the linear layers. Defaults to "truncnormal002". .. py:attribute:: layer .. py:method:: forward(x) Forward method of the MlpEncoder. :param x: Tensor of input data. :returns: Embedded/encoded tensor.