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

Allowed optimizers for Image Classification using Pytorch #516

Open
mrmhodak opened this issue Mar 2, 2023 · 5 comments
Open

Allowed optimizers for Image Classification using Pytorch #516

mrmhodak opened this issue Mar 2, 2023 · 5 comments

Comments

@mrmhodak
Copy link

mrmhodak commented Mar 2, 2023

Currently, Image Classification/LARS/Pytorch combination lists no compliant optimizers.

However, 2.2 submission by Habana used what looks like FusedLars optimizer (their own implementation) for Pytorch on ResNet.

Does that mean that built-in FusedLars is MLPerf compliant for Image Classification?

@mrmhodak
Copy link
Author

mrmhodak commented Mar 7, 2023

Actually, the optimizers that we want to use are FusedLAMB, FusedSGD imported from apex.optimizers:

from apex.optimizers import FusedLAMB, FusedSGD

Would these be MLPerf-compliant?

@nv-rborkar
Copy link
Contributor

@sgpyc to keep me honest.
LAMB is not an allowed optimizer for RN50. Only LARS and SGD are allowed.
https://github.com/mlcommons/training/tree/master/image_classification#optimizer

The rules already call allow apex.optimizers.FusedSGD here

@mrmhodak
Copy link
Author

3/23 update: The team is working on our own Fused Lars implementation for Pytorch. I should have a code to share for next week's meeting

@mrmhodak
Copy link
Author

Here is the Fused Lars code:
https://github.com/ROCmSoftwarePlatform/apex/blob/master/apex/optimizers/fused_lars.py

Please review that it is good to use

@nv-rborkar
Copy link
Contributor

nv-rborkar commented Apr 13, 2023

Thanks, implementation looks good as long as nesterov momentum is not used (reference doesn't use nesterov)

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