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

Half precision spectograms - Mixed precision training #6

Open
treasan opened this issue Apr 14, 2022 · 1 comment
Open

Half precision spectograms - Mixed precision training #6

treasan opened this issue Apr 14, 2022 · 1 comment
Labels
question Further information is requested

Comments

@treasan
Copy link

treasan commented Apr 14, 2022

Hey,
Is it sufficient to have the spectograms in half precision format (float16)? And did you train your model with mixed precision?

@YuanGongND YuanGongND added the question Further information is requested label Apr 14, 2022
@YuanGongND
Copy link
Owner

YuanGongND commented Apr 14, 2022

Hi there,

Is it sufficient to have the spectograms in half precision format (float16)?

I haven't used half-precision before, but I think it is worth having a try.

And did you train your model with mixed precision?

Not for SSAST as it seems torch.cuda.amp doesn't directly support multiple forward functions (e.g., mpg, mpc, etc in https://github.com/YuanGongND/ssast/blob/main/src/models/ast_models.py). But if you can find a workaround, I don't think that hurts the performance, as we use torch.cuda.amp in our original AST project (single forward function), see

https://github.com/YuanGongND/ast/blob/7b2fe7084b622e540643b0d7d7ab736b5eb7683b/src/traintest.py#L117-L122

and

https://github.com/YuanGongND/ast/blob/7b2fe7084b622e540643b0d7d7ab736b5eb7683b/src/models/ast_models.py#L159.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants