I use Ignite to train LSTM model based on this tutorial.
def forward(self, source, target, teacher_force_ratio=0.5):
How to pass target
and teacher_force_ratio
during training (teacher_force_ratio=0.5
) and validation process (teacher_force_ratio=0)
?
I have checked create_supervised_trainer and could not find such possibility.
Should I extend Dataset class:
return (source, target) -> return ((source, target, teacher_force_ratio), target)