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

The score for the same picture varies #31

Open
yier2333 opened this issue Jul 1, 2021 · 5 comments
Open

The score for the same picture varies #31

yier2333 opened this issue Jul 1, 2021 · 5 comments

Comments

@yier2333
Copy link

yier2333 commented Jul 1, 2021

No description provided.

@yunxiaoshi
Copy link
Owner

yunxiaoshi commented Jul 1, 2021

Try add

torch.backends.cudnn.deterministic = True

and

torch.cuda.manual_seed_all(seed)

to see if you can get consistent results. If not then according to https://pytorch.org/docs/stable/notes/randomness.html

Completely reproducible results are not guaranteed across PyTorch releases, individual commits, or different platforms. Furthermore, results may not be reproducible between CPU and GPU executions, even when using identical seeds.

@yier2333
Copy link
Author

yier2333 commented Jul 2, 2021

Try add

torch.backends.cudnn.deterministic = True

and

torch.cuda.manual_seed_all(seed)

to see if you can get consistent results. If not then according to https://pytorch.org/docs/stable/notes/randomness.html

Completely reproducible results are not guaranteed across PyTorch releases, individual commits, or different platforms. Furthermore, results may not be reproducible between CPU and GPU executions, even when using identical seeds.

not train model, I use your pretrained model to infer my image many times, but get different value

@yier2333
Copy link
Author

yier2333 commented Jul 2, 2021

I found the problem, your test_transform should use CenterCrop not RandomCrop

@wcc17864158993
Copy link

Try add

torch.backends.cudnn.deterministic = True

and

torch.cuda.manual_seed_all(seed)

to see if you can get consistent results. If not then according to https://pytorch.org/docs/stable/notes/randomness.html

Completely reproducible results are not guaranteed across PyTorch releases, individual commits, or different platforms. Furthermore, results may not be reproducible between CPU and GPU executions, even when using identical seeds.

Can you tell me how you downloaded the dataset and decompress it?

@cherryolg
Copy link

Hello, when I want to test my image, how does test_labels.csv get generated? What does test_labels.csv mean? Looking forward to your answer!

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

4 participants