AttributeError: module ‘tensorflow‘ has no attribute ‘flags‘

报错信息: AttributeError: module ‘tensorflow’ has no attribute ‘flags’

解决:

import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()


‍♂️tensorflow2.0不兼容tensorflow1.0

你可能感兴趣的:(机器学习,tensorflow,python,深度学习)