There is a small bug during running on gpu causing by the version of torchtext!
when I run this code on GPU, unfortunately,
RuntimeError: Expected object of backend CUDA but got backend CPU for argument #3 'index'
So, I guess the tensor may be not on GPU, and there is a warning:
The `device` argument should be set by using `torch.device` or passing a string as an argument. This behavior will be deprecated soon and currently defaults to CPU.
I change the parameter device, and then working now.
There is a small bug during running on gpu causing by the version of torchtext!
when I run this code on GPU, unfortunately,
So, I guess the tensor may be not on GPU, and there is a warning:
I change the parameter
device
, and then working now.maybe you could change it (●'◡'●)