RNMTPlusEncoder
- class opennmt.encoders.RNMTPlusEncoder(*args, **kwargs)[source]
The RNMT+ encoder described in https://arxiv.org/abs/1804.09849.
Inherits from:
opennmt.encoders.SequentialEncoder
- __init__(num_layers=6, num_units=1024, cell_class=None, dropout=0.3)[source]
Initializes the parameters of the encoder.
- Parameters
num_layers – The number of layers.
num_units – The number of units in each RNN layer and the final output.
cell_class – The inner cell class or a callable taking
num_units
as argument and returning a cell. Defaults to a layer normalized LSTM cell.dropout – The probability to drop units in each layer output.