ezjong / lightprobnets

LightProbNets
Other
26 stars 5 forks source link

test scripts #2

Open jaypatravali opened 4 years ago

jaypatravali commented 4 years ago

Hi. could you please provide test shell scripts for lenet, allconvnet probout. Trying on my own I am unable to get it to work successfully.

Also Training with train_cifar_allconvnet_probout.sh, i dont think the model is training after 300 epochs, the loss isnt going down.

ezjong commented 4 years ago

Hi, indeed, loss should go down (and accuracy up). The ADF is working? Otherwise, it's probably something with the Dirichlet layer..

jaypatravali commented 4 years ago

Hi, I think the loss just remains the same. The ADF i am unable to find out whats missing. I am on Pytorch 1.3.1.

The ADF codes are not working, there is an argument missing. see my other issue for the error

Also can you provide test scripts for all. Currently I only have them for test_cifar_fgsm_adf.sh test_cifar_fgsm_probout.sh test_inference.sh I tried making my own for testing a new script file test_mnist_lenet_probout.sh based off other testing scripts. python ../main.py \ --batch_size=64 \ --checkpoint=$CHECKPOINT \ --evaluation=True \ --model=$MODEL \ --num_workers=4 \ --proctitle=$MODEL \ --save="$SAVE_PATH" \ --total_epochs=20 \ --loss=DirichletProbOutLoss \ --loss_label_smoothing=1e-5 \ --validation_dataset=MnistValid \ --validation_dataset_root=$MNIST_HOME \ --validation_keys="[top1]" \ --validation_keys_minimize="[False]" I get this error

RuntimeError: While copying the parameter named _loss._smoothed_onehot._noise, whose dimensions in the model are torch.Size([0]) and whose dimensions in the checkpoint are torch.Size([16, 10]).