-
Notifications
You must be signed in to change notification settings - Fork 5
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
dcn_v2 error RuntimeError: expected scalar type Float but found Half #1
Comments
class DCN(DCNv2):
|
@KingWangJL Many thanks for your interest in our work. We also find this problem when we train our models with Apex Mixed Precision. However, we still have not found any good solution to this problem now. For now, we just train the model with full precision. |
Thanks your reply,I directly modified the dCN_v2 source code,At present, the network model training is normal,But I don't think it's a good way,it's only run is OK!
At 2022-02-25 14:08:07, "Shihua Huang" ***@***.***> wrote:
@KingWangJL Many thanks for your interest in our work. We also find this problem when we train our models with Apex Mixed Precision. However, we still have not found any good solution to this problem now. For now, we just train the model with full precision.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I have successfully trained the model using apex.amp and got comparable results. You can add @amp.float_function on top of the forward and backward function of modules in DCNv2. Maybe you can refer to CharlesShang/DCNv2#50 |
@LeoniusChen Cool! Thanks for your sharing! |
@LeoniusChen By the way, could you please share the final results when apex is used? |
Noted. Thanks again for your interest in our work. By the way, compared to the results in our paper, it is not good. |
When running the network, I encountered this problem. Through debugging, I found that the offset in DCN's forword function is a type of float16.So I think this might be the cause of the problem,Do you have a better idea for this problem.
The text was updated successfully, but these errors were encountered: