You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting this error while running the classifier.py script on custom dataset.
Image sizes 64 train, 64 test
Using 4 dataloader workers
Logging results to runs/train/exp7
Starting training for 1 epochs...
epoch gpu_mem train_loss val_loss accuracy
0%| | 0/165 [00:02<?, ?it/s]
Traceback (most recent call last):
File "classifier.py", line 241, in <module>
train()
File "classifier.py", line 125, in train
for i, (images, labels) in pbar:
File "/opt/conda/lib/python3.8/site-packages/tqdm/std.py", line 1193, in __iter__
for obj in iterable:
File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 518, in __next__
data = self._next_data()
File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1200, in _next_data
return self._process_data(data)
File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1226, in _process_data
data.reraise()
File "/opt/conda/lib/python3.8/site-packages/torch/_utils.py", line 428, in reraise
raise self.exc_type(msg)
RuntimeError: Caught RuntimeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 202, in _worker_loop
data = fetcher.fetch(index)
File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 47, in fetch
return self.collate_fn(data)
File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 84, in default_collate
return [default_collate(samples) for samples in transposed]
File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 84, in <listcomp>
return [default_collate(samples) for samples in transposed]
File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 56, in default_collate
return torch.stack(batch, 0, out=out)
RuntimeError: stack expects each tensor to be equal size, but got [3, 37, 32] at entry 0 and [3, 111, 154] at entry 1```
The text was updated successfully, but these errors were encountered:
Getting this error while running the classifier.py script on custom dataset.
The text was updated successfully, but these errors were encountered: