alibi-detect
alibi-detect copied to clipboard
For regressor-uncertainty detectors only put dropout layers of tensorflow models in train mode
Currently when performing Monte Carlo dropout to compute a notion of uncertainty all the models layers are put in training mode (by passing training=True to the call) whereas we would like the non-dropout layers to remain in inference mode.
It seems like it is tricky to implement this for a model that has already been compiled and trained (see here for example).
I believe that the current implementation is still a valid detector (i.e. calibrated p-values) but perhaps in some circumstances the 1D statistic that is computed might not accurately reflect model uncertainty and therefore the detector might not be sensitive in the expected manner.