Closed fabrahman closed 5 years ago
Hello. Great project.
I'm having the same issue as Hannabrahman. Exactly the same message.
I've tried pytorch 4.0 and 4.1 and cant get rid of this message.
@fmobrj Hi, try adding .to('cuda') or .cuda() at the end lines 31 , 32 of train.py. that is:
src = batch.src.transpose(0,1).to('cuda') trg = batch.trg.transpose(0,1).to('cuda')
That worked for me. Good luck
Hi, Hannabrahman! Thank you very much! Now it is working fine.
I am evaluating some Transformer projects, so I can fine tune my own, to my needs. It seems, by the folder structure, that most of them are forks from the OpenNmt project,
Best regards!
Hello,
Thank you for sharing your code.
I tried running the code (train.py) on a dataset (both source and target are English) and I am getting the following error in Batch.py.
I tried to add device= torch.device('cuda' if torch.cuda.is_available() else 'cpu') and np_mask.to(device) but still getting the same error. I git cloned your repo on my own machine and tried running train.py. My pytorch version is: 1.0.0.dev20181105