espnet.asr.pytorch_backend.asr.CustomUpdater
Less than 1 minute
espnet.asr.pytorch_backend.asr.CustomUpdater
class espnet.asr.pytorch_backend.asr.CustomUpdater(model, grad_clip_threshold, train_iter, optimizer, device, ngpu, grad_noise=False, accum_grad=1, use_apex=False, use_ddp=False)
Bases: StandardUpdater
Custom Updater for Pytorch.
- Parameters:
- model (torch.nn.Module) – The model to update.
- grad_clip_threshold (float) – The gradient clipping value to use.
- train_iter (chainer.dataset.Iterator) – The training iterator.
- optimizer (torch.optim.optimizer) – The training optimizer.
- device (torch.device) – The device to use.
- ngpu (int) – The number of gpus to use.
- use_apex (bool) – The flag to use Apex in backprop.
- use_ddp (bool) – The flag to use DDP for multi-GPU training.
Initliaze Custom Updater.
update()
Update Method.
update_core()
Update routine of the CustomUpdater (main).