New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'preprocess_input' defaults to 'caffe' rather than 'tf' #10279
Comments
Hi, The For more recent models such as Xception and MobileNet (where the training was under tf preprocessing), the preprocess_input function is actually redefined see: https://github.com/keras-team/keras/blob/master/keras/applications/xception.py#L267 for tf and https://github.com/keras-team/keras/blob/master/keras/applications/densenet.py#L325 for torch |
I see, I was testing Densenet so actually I should be using 'torch' or better yet import the corresponding preprocessing function and the model definition from 'densenet' (or other trained models). |
I had the same question. Thanks, @ialhashim @fchouteau for the clarification. Does that mean the recommended way of using preprocessing_input from models like vgg16 and resnet50 be mode='caffe' (the default one) itself for getting correct predictions on a Tensorflow backend too? |
I was very confused when my 'cat' pictures where predicted as 'lampshade'. Shouldn't Tensorflow be the default?
keras/keras/applications/imagenet_utils.py
Line 151 in b0f1bb9
The text was updated successfully, but these errors were encountered: