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

Some questions about the pytorch version #31

Closed
ewrfcas opened this issue Mar 22, 2022 · 9 comments
Closed

Some questions about the pytorch version #31

ewrfcas opened this issue Mar 22, 2022 · 9 comments

Comments

@ewrfcas
Copy link

ewrfcas commented Mar 22, 2022

Results from pytorch1.9 have more disorderly lines compared with ones from pytorch1.3.1.
Are there any bugs for it?
Lines from pytorch1.9:
image

Lines from pytorch1.3.1:
image

My HAWP model was trained in pytorch1.3.1

@cherubicXN
Copy link
Owner

Yes, it is. It is due to that PyTorch changed the behavior of the division function. I remembered that I fixed the bug and you can update your code. For the old version, the performance will be dramatically dropped from 66.5 to 40+ for the official model.

@ewrfcas
Copy link
Author

ewrfcas commented Apr 28, 2022

Thanks for your reply. I have tried to change the code.
From
y = (index / width).float() + torch.gather(joff[1], 0, index) + 0.5
to
y = (index // width).float() + torch.gather(joff[1], 0, index) + 0.5.
But this question is not solved...

Any other codes should be changed?

@cherubicXN
Copy link
Owner

Have you trained the model again after fixing the bug?

@ewrfcas
Copy link
Author

ewrfcas commented Apr 28, 2022

I have retrained the model before fixing it.

@cherubicXN
Copy link
Owner

I have retrained the model before fixing it.

How about the evaluation results?

@ewrfcas
Copy link
Author

ewrfcas commented Apr 28, 2022

I added some extra data augmentation, and the results are slightly better than the paper reported in torch1.3.1.
But I have not tested them for quantitative metrics in torch1.9.

@cherubicXN
Copy link
Owner

I added some extra data augmentation, and the results are slightly better than the paper reported in torch1.3.1. But I have not tested them for quantitative metrics in torch1.9.

Maybe some other changes in PyTorch lead to your results. In recent days, I have extensively trained many models with PyTorch-1.10. I did not have observed any incorrect results on my side after fixing the abovementioned bug as you did.

@ewrfcas
Copy link
Author

ewrfcas commented Apr 28, 2022

Thanks. I think that the model needs to be retrained in a new PyTorch version.

@cherubicXN
Copy link
Owner

Yes, it should be retrained.

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