Hi, @nmhkahn
I met this error finally.
What's wrong to me ??
Kerb:show_and_tell kerbal$ python3 train.py
Traceback (most recent call last):
File "train.py", line 27, in
main()
File "train.py", line 24, in main
solver.fit()
File "/Users/kerbal/pytorch-exercise/codes/show_and_tell/solver.py", line 41, in fit
for step, inputs in enumerate(self.train_loader):
File "/usr/local/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 637, in next
return self._process_next_batch(batch)
File "/usr/local/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 658, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
TypeError: Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 138, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/Users/kerbal/pytorch-exercise/codes/show_and_tell/dataset.py", line 114, in collate_fn
device=-1, train=True)
TypeError: process() got an unexpected keyword argument 'train'
Thanks.
I think that the latest torchtext remove train argument of the process function. Check this code field.py#L225.
Erase train=True makes it work.
@nmhkahn
OK, I'll try that method at today.
Many Thank.
@nmhkahn
When removing train argument:
Kerb:show_and_tell kerbal$ python3 train.py
Traceback (most recent call last):
File "train.py", line 27, in
main()
File "train.py", line 23, in main
solver = Solver(args)
File "/Users/kerbal/pytorch-exercise/codes/show_and_tell/solver.py", line 15, in init
text_field=True)
TypeError: get_caption_dataset() missing 1 required positional argument: 'train'
Kerb:show_and_tell kerbal$
--;