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

multiple index for each iteration #51

Closed
alitokur opened this issue Jul 16, 2020 · 2 comments
Closed

multiple index for each iteration #51

alitokur opened this issue Jul 16, 2020 · 2 comments

Comments

@alitokur
Copy link

Dear Sir, I don't know why but here the getitem function is called twice. (batch_size = 1 number_views = 1)

for epoch in range(start_epoch, opt.num_epoch): #number of epoch is 100
     for train_idx, train_data in enumerate(train_data_loader): 
         iter_start_time = time.time()
         break
     break

ex:
epoch=0;
train_idx=0
the first iteration calls the getitem
i have two index here: they are 352 and 97.
but the index returned : 352.
Is there any problem here or am I missing someting?

Screenshot from 2020-07-16 21-31-37

@shunsukesaito
Copy link
Owner

what is your number of workers for data loader? Check if you have the same issue, when you set num_threads=0.

@alitokur
Copy link
Author

alitokur commented Jul 16, 2020

huh! u are right, num_threads=0, fixed it. thank you sir.

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