onmt.Sequencer

Sequencer is the base class for encoder and decoder models. Main task is to manage self.net(t), the unrolled network used during training.

 :net(1) => :net(2) => ... => :net(n-1) => :net(n)

[src]

onmt.Sequencer(network)

Parameters:

  • network - recurrent step template.

[src]

onmt.Sequencer:net(t)

Get access to the recurrent unit at a timestep.

Parameters: * t - timestep.

Returns: The raw network clone at timestep t. When evaluate() has been called, cheat and return t=1.

[src]

onmt.Sequencer:training()

Move the network to train mode.

[src]

onmt.Sequencer:evaluate()

Move the network to evaluation mode.