wetliu / energy_ood

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scaling Factor ODIN

matteoguarrera opened this issue · comments

As stated by your readme your implementation is based on:
In particular, I would like to understand the following lines:

gradient[:,0] = (gradient[:,0] )/(63.0/255.0)
gradient[:,1] = (gradient[:,1] )/(62.1/255.0)
gradient[:,2] = (gradient[:,2] )/(66.7/255.0)

It seems there is an issue here. The original code is:

https://github.com/pokaxpoka/deep_Mahalanobis_detector/blob/90c2105e78c6f76a2801fc4c1cb1b84f4ff9af63/lib_generation.py#L171-L178

Thanks for your time

We did notice this issue and it seems to be a consistency problem of merging all different implementation code. This scaling factor is determined by TRAINING scale which is the same as https://github.com/hendrycks/outlier-exposure/blob/master/CIFAR/test.py/#L49. We believe switching to a different scaling during TEST time using Mahalanobis distance leads to unfair results, so we use the same scaling for all the other methods.