nlp-tutorial
nlp-tutorial copied to clipboard
Transformer/Transformer(Greedy_decoder)-Torch.py on gpu
Hello, I want to put the Transformer (Greedy_decoder)-Torch.py code on the gpu, using model=model.to(device), input_data also to (device), but the error still appears "Expected object of backend CUDA but backend CPU for argument #2 'mat2”
i fix the code in my clones https://github.com/zhangbo2008/nlp-tutorial/blob/master/1gpu.py use:pytorch 1.4 can run
i am learning transformer too , i still wonder why we use target_sentence in traning?