class_docstr: Sampling inputs in the dataloader pairwise as mentioned in the paper "Regularizing Class-wise Predictions via Self-knowledge Distillation"
   https://arxiv.org/pdf/2003.13964.pdf
  
  :param dataset (torchvision.dataset): dataset
  :param batch_size (int): batch_size
  :param num_iterations (int): num_iterations
class_docstr_tok: ["Sampling","inputs","in","the","dataloader","pairwise","as","mentioned","in","the","paper","``","Regularizing","Class-wise","Predictions","via","Self-knowledge","Distillation","''","https",":","\/\/arxiv.org\/pdf\/2003.13964.pdf",":","param","dataset","(","torchvision.dataset",")",":","dataset",":","param","batch_size","(","int",")",":","batch_size",":","param","num_iterations","(","int",")",":","num_iterations"]
code: def __init__(self, dataset, batch_size, num_iterations=None):
      self.dataset = dataset
      self.batch_size = batch_size
      self.num_iterations = num_iterations
  
imports: import csv
  import os
  import random
  from collections import defaultdict
  import numpy
  import torchvision
  from PIL import Image
  from torch.utils.data import BatchSampler, DataLoader, Dataset, RandomSampler, Sampler, SequentialSampler, Subset
  from torchvision import datasets, transforms
label_desc: Use image node_id 1 to create a new PairBatchSampler object from inherited base classes: Sampler with example: obj = PairBatchSampler(dataset, batch_size, num_iterations)