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

Divergent wh (width-height) loss #307

Closed
peterhsu2018 opened this issue May 31, 2019 · 4 comments
Closed

Divergent wh (width-height) loss #307

peterhsu2018 opened this issue May 31, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@peterhsu2018
Copy link

peterhsu2018 commented May 31, 2019

Hello, i have a question about the hyperparameters setting in train.py,
the learning rate here and in my .cfg if different, what's the value will be used?
Screenshot from 2019-05-31 11-55-23

@peterhsu2018 peterhsu2018 added the enhancement New feature or request label May 31, 2019
@peterhsu2018 peterhsu2018 changed the title The total loss question The question about hyperparameters setting May 31, 2019
@glenn-jocher
Copy link
Member

@peterhsu2018 your wh loss is diverging. You should increase your burnin period or decrease hyp['wh'], or alternatively implement a more stable wh loss as in #168.

@glenn-jocher glenn-jocher changed the title The question about hyperparameters setting Divergent wh (width-height) loss May 31, 2019
@glenn-jocher
Copy link
Member

To answer your other question the lr0 value in train.py is used, and the learning rate scheduler in defined in train.py as well:
scheduler = lr_scheduler.MultiStepLR(optimizer, milestones=[round(opt.epochs * x) for x in (0.8, 0.9)], gamma=0.1)

@peterhsu2018
Copy link
Author

peterhsu2018 commented Jun 3, 2019

@glenn-jocher
I notice the optimizer
optimizer = optim.SGD(model.parameters(), lr=hyp['lr0'], momentum=hyp['momentum'], weight_decay=hyp['weight_decay']) will use it, and
scheduler = optim.lr_scheduler.MultiStepLR(optimizer, milestones=[218, 245], gamma=0.1, last_epoch=start_epoch-1) was command out, but the learning_rate from .cfg seems to not used?
The first issue i found the root cause is the filename of datasets, 'abc.png.7ed8sj.png' is the origin name,
after i replace to 'abc_7ed8sj.png' is fine.

@glenn-jocher
Copy link
Member

@peterhsu2018 The learning rate from the .cfg file is only used if opt.plateau is False. To ensure correct usage, verify that opt.plateau in train.py is set to False. Regarding the dataset filename issue, thank you for sharing your solution. If you have any further questions or issues, feel free to ask!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants