sicara/tf-explain

Preprocessing function argument needed?

michaelsok opened this issue · 0 comments

Hi, and thanks for the work on interpretability!

It may be a dumb question, but shouldn't the methods like OcclusionSensitivity, SmoothGrad and any interpretability method which use modified inputs have a preprocess_function argument?
I mean, technically, the preprocessing may be a step before the model (such as the preprocess function in keras for VGG-16) but change the distribution of the images.
And usually images are normalized, so applying a grey patch on them (for OcclusionSensitivity) does not make sense (for instance, if we have pixels with range between 0 and 1, the grey patch gives images with pixels equal to 127.5).

So I think a preprocess argument may be needed when a model relies on it before training, but I may have missed something.

In all cases, thanks for the hard work!