The problem is, I have different number of data for training and testing which means during validation the index in getitem is between 0 and 3. However, during training the index number is between 0 and 7. The problem is how to define an if in getitem.