class_docstr: Custom evaluator.
class_docstr_tok: ["Custom","evaluator","."]
docstr: Initilize module.
  
  Args:
      model (torch.nn.Module): Pytorch model instance.
      iterator (chainer.dataset.Iterator): Iterator for validation.
      target (chainer.Chain): Dummy chain instance.
      device (torch.device): The device to be used in evaluation.
docstr_tok: ["Initilize","module",".","Args",":","model","(","torch.nn.Module",")",":","Pytorch","model","instance",".","iterator","(","chainer.dataset.Iterator",")",":","Iterator","for","validation",".","target","(","chainer.Chain",")",":","Dummy","chain","instance",".","device","(","torch.device",")",":","The","device","to","be","used","in","evaluation","."]
code: def __init__(self, model, iterator, target, device):
      """Initilize module.
  
      Args:
          model (torch.nn.Module): Pytorch model instance.
          iterator (chainer.dataset.Iterator): Iterator for validation.
          target (chainer.Chain): Dummy chain instance.
          device (torch.device): The device to be used in evaluation.
  
      """
      super(CustomEvaluator, self).__init__(iterator, target)
      self.model = model
      self.device = device
  
imports: import copy
  import json
  import logging
  import math
  import os
  import time
  import chainer
  import kaldiio
  import numpy
  import torch
  from chainer import training
  from chainer.training import extensions
  from espnet.asr.asr_utils import get_model_conf, snapshot_object, torch_load, torch_resume, torch_snapshot
  from espnet.asr.pytorch_backend.asr_init import load_trained_modules
  from espnet.nets.pytorch_backend.nets_utils import pad_list
  from espnet.nets.tts_interface import TTSInterface
  from espnet.utils.dataset import ChainerDataLoader, TransformDataset
  from espnet.utils.deterministic_utils import set_deterministic_pytorch
  from espnet.utils.dynamic_import import dynamic_import
  from espnet.utils.io_utils import LoadInputsAndTargets
  from espnet.utils.training.batchfy import make_batchset
  from espnet.utils.training.evaluator import BaseEvaluator
  from espnet.utils.training.iterators import ShufflingEnabler
  from espnet.utils.training.tensorboard_logger import TensorboardLogger
  from espnet.utils.training.train_utils import check_early_stop, set_early_stop
label_desc: Use image node_id 1 to create a new CustomEvaluator object from inherited base classes: BaseEvaluator with example: obj = CustomEvaluator(model, iterator, target, device)