在pycharm中安装TensorFlow后, 使用Tnesorflow1版本的操作,屏蔽tf2的操作。 import tensorflow.compat.v1 as tf tf.disable_v2_behavior()