class_docstr: Stratified Sampling
  
  Provides equal representation of target classes in each batch
  
  :param class_vector: (torch tensor):
          a vector of class labels
  :param batch_size: (int):
          size of the batch
class_docstr_tok: ["Stratified","Sampling","Provides","equal","representation","of","target","classes","in","each","batch",":","param","class_vector",":","(","torch","tensor",")",":","a","vector","of","class","labels",":","param","batch_size",":","(","int",")",":","size","of","the","batch"]
code: def __init__(self, class_vector, batch_size):
      self.n_splits = int(class_vector.size(0) / batch_size)
      self.class_vector = class_vector
  
imports: import math
  from .utils import th_random_choice
  import torch.utils.data
  import torchvision
  from .datasets import FolderDataset, MultiFolderDataset, PredictFolderDataset, ClonedFolderDataset
  from torch.utils.data.sampler import Sampler
label_desc: Use image node_id 1 to create a new StratifiedSampler object from inherited base classes: Sampler with example: obj = StratifiedSampler(class_vector, batch_size)