T2F
T2F copied to clipboard
RuntimeError: Expected object of backend CUDA but got backend CPU for argument #3 'index'
I am getting this error and don't know how to solve it, can you help please?
Starting the training process ...
Traceback (most recent call last):
File "train_network.py", line 426, in
I fixed this by changing fixed_embeddings = encoder(fixed_captions) line to fixed_embeddings = encoder(fixed_captions.to(device))
But im not sure if this is a good way to solve this error since I get some other errors after this. But you may try.
I fixed this by changing fixed_embeddings = encoder(fixed_captions) line to fixed_embeddings = encoder(fixed_captions.to(device))
But im not sure if this is a good way to solve this error since I get some other errors after this. But you may try.
It's useful. Thanks a lot.