You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the following error at trainer.backward_step() on running the demo script:
File "attn2d/nmt/trainer.py", line 230, in backward_step
self.clip_norm).data.item()
AttributeError: 'float' object has no attribute 'data'
which I fixed by: grad_norm = torch.nn.utils.clip_grad_norm_(self.model.parameters(), self.clip_norm)
Which then runs OK for torch==0.4.1
Which version of pytorch was the code written for?
The text was updated successfully, but these errors were encountered:
I get the following error at trainer.backward_step() on running the demo script:
File "attn2d/nmt/trainer.py", line 230, in backward_step
self.clip_norm).data.item()
AttributeError: 'float' object has no attribute 'data'
which I fixed by:
grad_norm = torch.nn.utils.clip_grad_norm_(self.model.parameters(), self.clip_norm)
Which then runs OK for torch==0.4.1
Which version of pytorch was the code written for?
The text was updated successfully, but these errors were encountered: