emmi.modules.encoder.mlp_encoder¶
Classes¶
A 2-layer MLP encoder. Can be use to encode (i.e., embed) the input data. |
Module Contents¶
- class emmi.modules.encoder.mlp_encoder.MlpEncoder(input_dim, hidden_dim, init_weights='truncnormal002')¶
Bases:
torch.nn.ModuleA 2-layer MLP encoder. Can be use to encode (i.e., embed) the input data.
Initialize the MlpEncoder.
- Parameters:
- layer¶
- forward(x)¶
Forward method of the MlpEncoder.
- Parameters:
x – Tensor of input data.
- Returns:
Embedded/encoded tensor.