yunxiaoshi / Neural-IMage-Assessment

A PyTorch Implementation of Neural IMage Assessment
Other
508 stars 92 forks source link

The score for the same picture varies #31

Open yier2333 opened 3 years ago

yunxiaoshi commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

wcc17864158993 commented 2 years ago

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 commented 2 years ago

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!