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

torch.util.data.IterableDataset #17

Closed
wangzeyu135798 opened this issue Jan 7, 2021 · 1 comment
Closed

torch.util.data.IterableDataset #17

wangzeyu135798 opened this issue Jan 7, 2021 · 1 comment

Comments

@wangzeyu135798
Copy link

Hi:
In graph_dataset.py , class LoadBalanceGraphDataset(torch.utils.data.IterableDataset), self.num_samples default is 2000. I want to learn what's the relation between this variable and tensor.batch_size.In my own experiment, my class Dataset belong to IterableDataset, when self.num_samples is not the multiple of train_loader.batch_size, it will be wring.

@qibinc
Copy link
Collaborator

qibinc commented Jan 7, 2021

Hi @wangzeyu135798 ,

Please provide more information (e.g., python traceback) of the error. From your description, adding the drop_last=True param to the dataloader construction might solve the problem.

@qibinc qibinc closed this as completed Jan 13, 2021
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

2 participants