class_docstr: Custom batch converter for Pytorch.
  
  Args:
      subsampling_factor (int): The subsampling factor.
      dtype (torch.dtype): Data type to convert.
class_docstr_tok: ["Custom","batch","converter","for","Pytorch",".","Args",":","subsampling_factor","(","int",")",":","The","subsampling","factor",".","dtype","(","torch.dtype",")",":","Data","type","to","convert","."]
docstr: Initialize the converter.
docstr_tok: ["Initialize","the","converter","."]
code: def __init__(
      self, subsampling_factor=1, dtype=torch.float32, num_spkrs=2
  ):
      """Initialize the converter."""
      self.subsampling_factor = subsampling_factor
      self.ignore_id = -1
      self.dtype = dtype
      self.num_spkrs = num_spkrs
  
imports: import json
  import logging
  import os
  from itertools import zip_longest
  import numpy
  import torch
  from chainer import training
  from chainer.training import extensions
  import espnet.lm.pytorch_backend.extlm
  import espnet.nets.pytorch_backend.lm.default
  from espnet.asr.asr_mix_utils import add_results_to_json
  from espnet.asr.asr_utils import CompareValueTrigger, adadelta_eps_decay, get_model_conf, restore_snapshot, snapshot_object, torch_load, torch_resume, torch_snapshot
  from espnet.asr.pytorch_backend.asr import CustomEvaluator, CustomUpdater, load_trained_model
  from espnet.nets.asr_interface import ASRInterface
  from espnet.nets.pytorch_backend.e2e_asr_mix import pad_list
  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.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 CustomConverter object from inherited base classes: object with example: obj = CustomConverter(subsampling_factor, dtype, num_spkrs)