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

Has anyone tried mixed precision training? #242

Open
ggsggs opened this issue Jul 31, 2019 · 1 comment
Open

Has anyone tried mixed precision training? #242

ggsggs opened this issue Jul 31, 2019 · 1 comment

Comments

@ggsggs
Copy link

ggsggs commented Jul 31, 2019

I was looking at the training script of YOLOv3 from Ultralytics repo and they use mixed-precision training using https://github.com/NVIDIA/apex.

Has anyone tried implementing in the training scripts?

Quoting the example from Nvidia:

Three lines enable Amp:

# Added after model and optimizer construction
 model, optimizer = amp.initialize(model, optimizer, flags...)
 ...
 # loss.backward() changed to:
 with amp.scale_loss(loss, optimizer) as scaled_loss:
     scaled_loss.backward()
@xingyizhou
Copy link
Owner

I haven't.

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