When I run my training loop, I get the following error while trying to iterate over my test DataLoader. However, it does not occur when using my train DataLoader (they are 2 different files).
TypeError: default_collate: batch must contain tensors, numpy arrays, numbers, dicts or lists; found object
This is how I am iterating over the DataLoader
for batch in data_loader:
optimizer.zero_grad()