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

Probability of outputs not ensure #15

Open
zhuyi3625 opened this issue Mar 13, 2021 · 1 comment
Open

Probability of outputs not ensure #15

zhuyi3625 opened this issue Mar 13, 2021 · 1 comment

Comments

@zhuyi3625
Copy link

zhuyi3625 commented Mar 13, 2021

it has different outputs when I input the same picture into the model which is trained by myself.However when use the pretrained '.pth' model,the output is right,and the probability tensor is ensure,in contrast,my probability tensor will change in every tests.

I trained model use python main.py --lr=0.01 --dataset=CIFAR10 --arch=wrn28_10_cifar10 --hierarchy=induced-wrn28_10_cifar10 --pretrained --loss=SoftTreeSupLoss.

input is dog.jpg,twice outputs are below

out tensor([[0.1268, 0.1282, 0.1303, 0.0642, 0.0618, 0.0623, 0.1216, 0.0618, 0.1176,
0.1254]], grad_fn=)
result
bird

out tensor([[0.1245, 0.1192, 0.1246, 0.0643, 0.0636, 0.0649, 0.1203, 0.0634, 0.1291,
0.1261]], grad_fn=)
result
ship

@alvinwan
Copy link
Owner

Hm are those the outputs after training the model twice? If so, double-check the script downloaded/loaded the pretrained WRN28x10 correctly.

Or do you mean those are the outputs after training *1 model and running inference twice? If so, make sure you're using model.eval() for deterministic predictions.

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