core.nn.enets.DenseResidualNet
core.nn.enets.DenseResidualNet(
input_dim,
output_dim,
hidden_dims,
activation= F.elu,
dropout= 0.0 ,
batch_norm= True ,
context_features= None ,
)
A nn.Module consisting of a sequence of dense residual blocks. This is used to embed high dimensional input to a compressed output. Linear resizing layers are used for resizing the input and output to match the first and last hidden dimension, respectively.
Module specs
input dimension: (batch_size, input_dim)
output dimension: (batch_size, output_dim)
Parameters
input_dim
int
dimension of the input to this module
required
output_dim
int
output dimension of this module
required
hidden_dims
tuple
tuple with dimensions of hidden layers of this module
required
activation
Callable
activation function used in residual blocks
F.elu
dropout
float
dropout probability for residual blocks used for reqularization
0.0
batch_norm
bool
flag that specifies whether to use batch normalization
True
context_features
int
Number of additional context features, which are provided to the residual blocks via gated linear units. If None, no additional context expected.
None
Methods
forward
core.nn.enets.DenseResidualNet.forward(x, context= None )