Skip to content

Conversation

@ssnl
Copy link
Collaborator

@ssnl ssnl commented Mar 29, 2018

Set dataloader's batch_size and drop_last to None when `batch_sampler is given. Add a warning in doc for this case.

Address #5884.

:attr:`shuffle`, :attr:`sampler`, or :attr:`drop_last` is
invalid because such information is provided by
:attr:`batch_sampler`. In this case, the data loader will have
``dataloader.batch_size == dataloader.drop_last == dataloader.sampler == None``.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

Copy link
Contributor

@apaszke apaszke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but let's remove the warning from the docs

:attr:`shuffle`, :attr:`sampler`, or :attr:`drop_last` is
invalid because such information is provided by
:attr:`batch_sampler`. In this case, the data loader will have
``dataloader.batch_size == dataloader.drop_last == dataloader.sampler == None``.

This comment was marked as off-topic.

@ssnl
Copy link
Collaborator Author

ssnl commented Mar 29, 2018

@apaszke Removed!

Copy link
Contributor

@apaszke apaszke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM!

@apaszke apaszke merged commit 60a16e5 into pytorch:master Mar 30, 2018
@ssnl ssnl deleted the dl_sample_bn branch March 30, 2018 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants