1. import os
    2. os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
    3. import tensorflow.compat.v1 as tf
    4. tf.disable_v2_behavior()
    5. tf.logging.set_verbosity(tf.logging.ERROR)

    顺序很重要