Skip to content Skip to sidebar Skip to footer

Loading Tensorflow 1.x.x Model Into Tensorflow 2.x.x

I have a SavedModel created with TF1 being loaded with TF2. I am getting a warning for each variable in the graph it seems, which is: WARNING:tensorflow:Unable to create a python o

Solution 1:

Logging in TensorFlow changed in more recent versions, and TF_CPP_MIN_LOG_LEVEL is not used anymore (see issues #26348 and #31870). Try with tf.get_logger().setLevel('ERROR').

import tensorflow as tf
tf.get_logger().warning('test')
# WARNING:tensorflow:test
tf.get_logger().setLevel('ERROR')
tf.get_logger().warning('test')
# (silence)

Post a Comment for "Loading Tensorflow 1.x.x Model Into Tensorflow 2.x.x"