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
Hi,
In test mode, on pre-trained non-autoregressive model and with the MS COCO dataset, I got the RuntimeError about the batch size as below, As I should write another Collate function or I have to do something else? Could you please advise me in this regard?
start decoding: 0%| | 0/200 [00:00<?, ?it/s]Traceback (most recent call last):
File "/media/deeplab/f6321bd3-2eb4-461a-9abc-d10e94252592/Vahid Chahkandi/dl4mt-nonauto-master/run.py", line 612, in <module>
names=["test." + xx for xx in names], maxsteps=None)
File "/media/deeplab/f6321bd3-2eb4-461a-9abc-d10e94252592/Vahid Chahkandi/dl4mt-nonauto-master/decode.py", line 173, in decode_model
for iters, dev_batch in enumerate(dev):
File "/home/deeplab/dl4mt-nonauto-master/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 363,
in __next__
data = self._next_data()
File "/home/deeplab/dl4mt-nonauto-master/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 989,
in _next_data
return self._process_data(data)
File "/home/deeplab/dl4mt-nonauto-master/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1014,
in _process_data data.reraise()
File "/home/deeplab/dl4mt-nonauto-master/lib/python3.7/site-packages/torch/_utils.py", line 395,
in reraise raise self.exc_type(msg)
RuntimeError: Caught RuntimeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/deeplab/dl4mt-nonauto-master/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 185,
in _worker_loop data = fetcher.fetch(index)
File "/home/deeplab/dl4mt-nonauto-master/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 47,
in fetch
return self.collate_fn(data)
File "/home/deeplab/dl4mt-nonauto-master/lib/python3.7/site-packages/torch/utils/data/_utils/collate.py", line 84,
in default_collate return [default_collate(samples) for samples in transposed]
File "/home/deeplab/dl4mt-nonauto-master/lib/python3.7/site-packages/torch/utils/data/_utils/collate.py", line 84,
in <listcomp>
return [default_collate(samples) for samples in transposed]
File "/home/deeplab/dl4mt-nonauto-master/lib/python3.7/site-packages/torch/utils/data/_utils/collate.py", line 82,
in default_collate raise RuntimeError('each element in list of batch should be of equal size')
RuntimeError: each element in list of batch should be of equal size
The text was updated successfully, but these errors were encountered:
Hi,
In test mode, on pre-trained non-autoregressive model and with the MS COCO dataset, I got the RuntimeError about the batch size as below, As I should write another Collate function or I have to do something else? Could you please advise me in this regard?
The text was updated successfully, but these errors were encountered: