neural-backed-decision-trees
neural-backed-decision-trees copied to clipboard
Probability of outputs not ensure
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=<CopySlices>) 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=<CopySlices>) result ship
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.