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

Training code #14

Closed
okanlv opened this issue Sep 15, 2018 · 1 comment
Closed

Training code #14

okanlv opened this issue Sep 15, 2018 · 1 comment

Comments

@okanlv
Copy link

okanlv commented Sep 15, 2018

Is the following for loop necessary? Except for the last batch, len(imgs) = n, so j could only be 0 in the loop. In the last batch, if len(imgs) is smaller than n, int(len(imgs) / n) = 0, the loop is ignored. Otherwise, len(imgs) = n, so j could only be 0 in the loop.

yolov3/train.py

Lines 118 to 119 in 68de92f

n = opt.batch_size # number of pictures at a time
for j in range(int(len(imgs) / n)):

@glenn-jocher
Copy link
Member

glenn-jocher commented Sep 19, 2018

You are correct, the for loop is not necessary. This code was in place from a different project, but is not needed here, so I've eliminated it in commit 29fbcb0. Good catch!

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