def __init__(self, dataset, n_fold=10, batch_size=32, num_workers=0, pin_memory=False):
    self.fold = 0
    self.batch_size = batch_size
    self.num_workers = num_workers
    self.pin_memory = pin_memory
    self.dataset = dataset
    self.n_fold = n_fold
    self.fold_size = (len(self.dataset) // self.n_fold)
    self.folded_size = (self.n_fold * self.fold_size)
    self.fold_idx = self.fold_split()
def __init__(self, dataset, n_fold=10, batch_size=32, num_workers=0, pin_memory=False):
    self.fold = 0
    self.batch_size = batch_size
    self.num_workers = num_workers
    self.pin_memory = pin_memory
    self.dataset = dataset
    self.n_fold = n_fold
    self.fold_size = (len(self.dataset) // self.n_fold)
    self.folded_size = (self.n_fold * self.fold_size)
    self.fold_idx = self.fold_split()