class_docstr: Permutation Invariant Training (PIT) module.
  
  :parameter int num_spkrs: number of speakers for PIT process (2 or 3)
class_docstr_tok: ["Permutation","Invariant","Training","(","PIT",")","module",".",":","parameter","int","num_spkrs",":","number","of","speakers","for","PIT","process","(","2","or","3",")"]
docstr: Initialize PIT module.
docstr_tok: ["Initialize","PIT","module","."]
code: def __init__(self, num_spkrs):
      """Initialize PIT module."""
      self.num_spkrs = num_spkrs
  
      # [[0, 1], [1, 0]] or
      # [[0, 1, 2], [0, 2, 1], [1, 0, 2], [1, 2, 0], [2, 1, 0], [2, 0, 1]]
      self.perm_choices = []
      initial_seq = np.linspace(
          0, num_spkrs - 1, num_spkrs, dtype=np.int64
      )
      self.permutationDFS(initial_seq, 0)
  
      # [[0, 3], [1, 2]] or
      # [[0, 4, 8], [0, 5, 7], [1, 3, 8], [1, 5, 6], [2, 4, 6], [2, 3, 7]]
      self.loss_perm_idx = np.linspace(
          0, num_spkrs * (num_spkrs - 1), num_spkrs, dtype=np.int64
      ).reshape(1, num_spkrs)
      self.loss_perm_idx = (
          self.loss_perm_idx + np.array(self.perm_choices)
      ).tolist()
  
imports: import argparse
  import logging
  import math
  import os
  import sys
  from itertools import groupby
  import numpy
  import torch
  from espnet.nets.asr_interface import ASRInterface
  from espnet.nets.e2e_asr_common import get_vgg2l_odim, label_smoothing_dist
  from espnet.nets.pytorch_backend.ctc import ctc_for
  from espnet.nets.pytorch_backend.e2e_asr import E2E
  from espnet.nets.pytorch_backend.e2e_asr import Reporter
  from espnet.nets.pytorch_backend.frontends.feature_transform import feature_transform_for
  from espnet.nets.pytorch_backend.frontends.frontend import frontend_for
  from espnet.nets.pytorch_backend.initialization import lecun_normal_init_parameters, set_forget_bias_to_one
  from espnet.nets.pytorch_backend.nets_utils import get_subsample, make_pad_mask, pad_list, to_device, to_torch_tensor
  from espnet.nets.pytorch_backend.rnn.attentions import att_for
  from espnet.nets.pytorch_backend.rnn.decoders import decoder_for
  from espnet.nets.pytorch_backend.rnn.encoders import RNNP, VGG2L
  from espnet.nets.pytorch_backend.rnn.encoders import encoder_for
label_desc: Use image node_id 1 to create a new PIT object from inherited base classes: object with example: obj = PIT(num_spkrs)