Skip to content

Commit

Permalink
Remove potentially misleading warning messages in applications.
Browse files Browse the repository at this point in the history
  • Loading branch information
fchollet committed May 8, 2018
1 parent 8e4ddf0 commit b0f1bb9
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 53 deletions.
10 changes: 0 additions & 10 deletions keras/applications/inception_resnet_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,16 +352,6 @@ def InceptionResNetV2(include_top=True,

# Load weights
if weights == 'imagenet':
if K.image_data_format() == 'channels_first':
if K.backend() == 'tensorflow':
warnings.warn('You are using the TensorFlow backend, yet you '
'are using the Theano '
'image data format convention '
'(`image_data_format="channels_first"`). '
'For best performance, set '
'`image_data_format="channels_last"` in '
'your Keras config '
'at ~/.keras/keras.json.')
if include_top:
fname = 'inception_resnet_v2_weights_tf_dim_ordering_tf_kernels.h5'
weights_path = get_file(fname,
Expand Down
10 changes: 0 additions & 10 deletions keras/applications/inception_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,16 +366,6 @@ def InceptionV3(include_top=True,

# load weights
if weights == 'imagenet':
if K.image_data_format() == 'channels_first':
if K.backend() == 'tensorflow':
warnings.warn('You are using the TensorFlow backend, yet you '
'are using the Theano '
'image data format convention '
'(`image_data_format="channels_first"`). '
'For best performance, set '
'`image_data_format="channels_last"` in '
'your Keras config '
'at ~/.keras/keras.json.')
if include_top:
weights_path = get_file(
'inception_v3_weights_tf_dim_ordering_tf_kernels.h5',
Expand Down
11 changes: 0 additions & 11 deletions keras/applications/resnet50.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,17 +273,6 @@ def ResNet50(include_top=True, weights='imagenet',
model.load_weights(weights_path)
if K.backend() == 'theano':
layer_utils.convert_all_kernels_in_model(model)

if (K.image_data_format() == 'channels_first' and
K.backend() == 'tensorflow'):
warnings.warn('You are using the TensorFlow backend, yet you '
'are using the Theano '
'image data format convention '
'(`image_data_format="channels_first"`). '
'For best performance, set '
'`image_data_format="channels_last"` in '
'your Keras config '
'at `~/.keras/keras.json`.')
elif weights is not None:
model.load_weights(weights)

Expand Down
11 changes: 0 additions & 11 deletions keras/applications/vgg16.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,17 +178,6 @@ def VGG16(include_top=True, weights='imagenet',
model.load_weights(weights_path)
if K.backend() == 'theano':
layer_utils.convert_all_kernels_in_model(model)

if (K.image_data_format() == 'channels_first' and
K.backend() == 'tensorflow'):
warnings.warn('You are using the TensorFlow backend, yet you '
'are using the Theano '
'image data format convention '
'(`image_data_format="channels_first"`). '
'For best performance, set '
'`image_data_format="channels_last"` in '
'your Keras config '
'at `~/.keras/keras.json`.')
elif weights is not None:
model.load_weights(weights)

Expand Down
11 changes: 0 additions & 11 deletions keras/applications/vgg19.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,17 +181,6 @@ def VGG19(include_top=True, weights='imagenet',
model.load_weights(weights_path)
if K.backend() == 'theano':
layer_utils.convert_all_kernels_in_model(model)

if (K.image_data_format() == 'channels_first' and
K.backend() == 'tensorflow'):
warnings.warn('You are using the TensorFlow backend, yet you '
'are using the Theano '
'image data format convention '
'(`image_data_format="channels_first"`). '
'For best performance, set '
'`image_data_format="channels_last"` in '
'your Keras config '
'at `~/.keras/keras.json`.')
elif weights is not None:
model.load_weights(weights)

Expand Down

0 comments on commit b0f1bb9

Please sign in to comment.