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

Re-fix #137 #182

Merged
merged 5 commits into from
Dec 22, 2017
Merged

Re-fix #137 #182

merged 5 commits into from
Dec 22, 2017

Conversation

jihunchoi
Copy link
Contributor

This PR resolves #137.
Currently, __len__ is implemented by:

    def __len__(self):
        return math.ceil((len(self.dataset[0].text) - 1) /
                         (self.batch_size * self.bptt_len))

This is insufficient, since "substraction by 1" should be performed in a batch-level.

@jekbradbury jekbradbury merged commit 776e0f0 into pytorch:master Dec 22, 2017
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

Successfully merging this pull request may close these issues.

BPTTIterator: Result of Slicing is an empty tensor
2 participants