I am using Keras to create a deep learning model. When I creating a VGG16 model, the model is created but I get the following warning.
vgg16_model = VGG16()
why this warning happens and how can I resolve this?
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
It looks like there's an open git issue to clean this up in the keras code:
https://github.com/tensorflow/minigo/issues/740
You should be safe to ignore the warning, I don't believe you can change it without modifying the TF repo. You can disable warnings as mentioned here:
tf.logging.set_verbosity(tf.logging.ERROR)
You can use the function below to avoid these warnings. First, you must make the appropriate imports:
import os
os.environ['KERAS_BACKEND']='tensorflow'
import tensorflow as tf
def tf_no_warning():
"""
Make Tensorflow less verbose
"""
try:
tf.logging.set_verbosity(tf.logging.ERROR)
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
except ImportError:
pass
And then call the above function at the beginning of the code.
tf_no_warning()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With