Preprocessing_function in fastai for Resnet, Densenet


In Keras, there is a function preprocess_input per application (Resnet50, VGG16…) which takes care of the input preprocesing. For example normalize the input to the range [-1, 1] or to [0, 1]…

I’ve seen that fastai 0.7 had a ImageDataGenerator.preprocessing_function probably for the same reason.

Which class or method takes care of the input preprocessing of well known models in fastai/pytorch?


1 Like