Skip to content

DataLoader reports batch_size 1, even if BatchSampler is specified.  #5884

@Erotemic

Description

@Erotemic

In the definition of DataLoader, the argument batch_size defaults to 1, even when sampler is also specified. This causes it to appear that the batch_size is 1 even if sampler is doing something more complex. This makes it difficult to determine if DataLoader's batch_size attribute is correct or if we should prove sampler for more details because sampler is always specified.

What should happen is batch_size should default to None, and if no sampler is specified, then it should change its value to 1. This change will make it simple to see that the batch_size attribute of DataLoader` might not be used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    todoNot as important as medium or high priority tasks, but we will work on these.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions