espnet.nets.pytorch_backend.rnn.encoders.encoder_for
Less than 1 minute
espnet.nets.pytorch_backend.rnn.encoders.encoder_for
espnet.nets.pytorch_backend.rnn.encoders.encoder_for(args, idim, subsample)
Instantiate an encoder module given the program arguments.
- Parameters:
args (Namespace) – The arguments
idim (int or List of integer) – dimension of input, e.g. 83, or List of dimensions of inputs, e.g. [83,83]
subsample (List or List of List) –
subsample factors, e.g. [1,2,2,1,1], or List of subsample factors of each encoder.
e.g. [[1,2,2,1,1], [1,2,2,1,1]]
:rtype torch.nn.Module :return: The encoder module