Skip to content

Fix off-by-one error in train.py#7

Closed
codeman38 wants to merge 1 commit into
spro:masterfrom
codeman38:off-by-one
Closed

Fix off-by-one error in train.py#7
codeman38 wants to merge 1 commit into
spro:masterfrom
codeman38:off-by-one

Conversation

@codeman38

Copy link
Copy Markdown

random.randint specifies an inclusive range, so start_index was sometimes (file_len - chunk_len). This would produce input and target tensors of size (chunk_len - 1), instead of chunk_len, making the batch unparallelizable and causing a crash.

random.randint specifies an inclusive range, so start_index was
sometimes (file_len - chunk_len). This would produce input and
target tensors of size (chunk_len - 1), instead of chunk_len,
making the batch unparallelizable and causing a crash.
@codeman38

codeman38 commented Jan 10, 2018

Copy link
Copy Markdown
Author

Closing, as this is a duplicate of both #3 and #5.

@codeman38 codeman38 closed this Jan 10, 2018
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.

1 participant