Open samanthatansy opened 2 years ago
Hi @samanthatansy,
Make sare that you have already import torch.nn
import torch.nn as nn
Maybe you mistook deleting that line.
hi i imported torch.nn, but even if i do not delete that line (.cuda) and use GPU (using the same codes as provided exactly), i still get the same error. Also may I check, must I write anything in the command line arguments? (is it something compulsory to fill?) if yes then what does '--finetuning' and '--top_rnns' mean? thanks!
Hi, I am trying to only use xlnet model without the gcn for NER. I have ran train.py in the 'xlnet-ner' folder and obtained the saved weights - '4.pt' in a finetuning folder. However, I have issues with the predict.py file. When I try to run it, I get the following error:
I then fixed it by added 'import torch.nn as nn'. However, after that, i get the following error:
I am using the same codes, but had only removed .cuda() as I am only using 'cpu'
I am not sure what is wrong, please help thank you!