Open adwaykanhere opened 2 years ago
Was this commented out when you run create_train_loader
?
# for i in train_idxs:
# dataset.targets[i] = np.where(classes == dataset.targets[i])[0][0]
Yes, But that was because I had initially transformed train indices in create_loaders_final
You need to use deep copies of the dataset on that, too. There's no point of deep copies if you don't save the original. Then the copy becomes "original."
Yes, I'm using a deepcopy of the dataset for the create_train_loader
and create_loaders_final
. I'm still getting the error.
You have to create a deep copy each time you use those functions.
If I add deep copies before using each function, I get the error - IndexError: Target 7 is out of bounds.
Create deep copies inside the functions
I'm still getting the same error even after creating copies inside the functions
When creating train+val loaders for tuning CNNs for vision data, the following traceback is received: