Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

AttributeError: 'torch.FloatTensor' object has no attribute 'detach' #85

Open
lihy-1224 opened this issue Dec 6, 2018 · 1 comment
Open

Comments

@lihy-1224
Copy link

When I run the model "Character level Penn Treebank (PTB) with LSTM", an error occur ——
File "/awd-lstm-lm-master 2/utils.py", line 8, in repackage_hidden
return h.detach()
AttributeError: 'torch.FloatTensor' object has no attribute 'detach'.
Do you know how to fix it? thx ~ I'm a rookie in NLP.

@kevinalexmathews
Copy link

Any update?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants