wjko2 / Domain-Agnostic-Sentence-Specificity-Prediction

13 stars 10 forks source link

np.sqrt(total_norm.cpu()) raising AttributeError on train.py #2

Closed lucas0 closed 5 years ago

lucas0 commented 5 years ago

Traceback (most recent call last): File "train.py", line 488, in train_acc = trainepoch(epoch) File "train.py", line 443, in trainepoch total_norm = np.sqrt(total_norm.cpu()) AttributeError: 'float' object has no attribute 'cpu'

Is there a particular reason for you to use .cpu() here? Seems like it could be removed.

wjko2 commented 5 years ago

Also looks like a pytorch version issue