def preprocess_input(x):
x /= 255.
x -= 0.5
x *= 2.
return x
I am using keras inception_v3 imagenet pretrained model(inception_v3.py) to finetune on my own dataset.
When I want to subtract the imagenet mean value [123.68, 116.779, 103.939] and reverse axis RGB to BGR as we often do, I find that the author provided a _preprocess_input()_ function at the end.I am confused about this.
Should I use the provided function preprocess_input() or subtract mean value and reverse axis as usual?
Thanks lot.