This folder contains the source code and weights for the experiments of our work, Probability Trust Intervals for Out of Distribution Input Detection
.
- The files Cn.py (n denotes the architecture number) contains the code for the Perturbed-NNs.
- The files, Cn_Eval.py (n denotes the architecture number) contains the code for evaluation of all the considered baselines and our proposed approach.
All the experiments are done on Google Colaboratory. The links to original files have been removed for the purpose of double blind review. If you are interested in executing our code, you may follow the steps given below,
- Upload the code files to the above website.
- Create a
weights
folder in your Google drive. Under this folder, create,mnist
subfolder for weights ofmnist
,cifar10
subfolder for weights ofcifar10
and so on for other datasets. - Mount Google drive to Google colaboratory. You may use these instructions in order to do the same.
- Change the
prefix
variable (search forprefix = ""
) in the uploaded code file to the path of parent folder ofweights
in your Google drive. For example if yourweights
folder is somewhere in the path,./drive/My Drive/reviewCode/PNN/weights
then value ofprefix
should be./drive/My Drive/reviewCode/PNN/
(observe that the path is toPNN
, the parent folder ofweights
). - Now you should be able to run the notebook and re-generate the results.
We are unable to provide weights of CNNs and PNNs due to the maximum file size limit imposed for the supplementary material.