Thanks I use that  but dont know why i get an error

  
    
    
    Error With Sequential Sampler vision
  
  
    When dataloader iterates through the below loader ,i get an error saying 
index 307 is out of bounds for axis 0 with size 307 
but with RandomSampler i dont get any error. size of valid set array is 307 . 
for tr_idx, val_idx in tqdm(kf.split(z)):

    train_dataset = DatasetRetriever(
        train_arrays=z[tr_idx],#.index.values,
        targets= y[tr_idx]

    )

    valid_dataset = DatasetRetriever(
        train_arrays=z[val_idx],#.index.values,
        targets= y[val_idx]

    )

valid_loa…