Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tricky usage of view() #33

Closed
leckie-chn opened this issue Aug 14, 2018 · 1 comment
Closed

tricky usage of view() #33

leckie-chn opened this issue Aug 14, 2018 · 1 comment

Comments

@leckie-chn
Copy link

ch = masked_states.view(-1, self.nhid).mm(self._Ws[i]).view(i+1, -1, 2*self.nhid)

Seems that the code will produce RuntimeError since i+1 might be undivisable by the whole tensor shape. Is there anything missing to me? Or it's just a fancy usage of torch.view() ?

@leckie-chn
Copy link
Author

sorry just missed something

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

No branches or pull requests

1 participant