espnet.asr.pytorch_backend.asr.CustomEvaluator
Less than 1 minute
espnet.asr.pytorch_backend.asr.CustomEvaluator
class espnet.asr.pytorch_backend.asr.CustomEvaluator(model, iterator, target, device, ngpu=None, use_ddp=False)
Bases: BaseEvaluator
Custom Evaluator for Pytorch.
- Parameters:
- model (torch.nn.Module) – The model to evaluate.
- iterator (chainer.dataset.Iterator) – The train iterator.
- target (link | dict *[*str , link ]) – Link object or a dictionary of links to evaluate. If this is just a link object, the link is registered by the name
'main'
. - device (torch.device) – The device used.
- ngpu (int) – The number of GPUs.
- use_ddp (bool) – The flag to use DDP.
Initialize Custom Evaluator.
evaluate()
Evaluate routine (main) for CustomEvaluator.