zjh__1的博客将import tensorflow as tf 改成import tensorflow.compat.v1 as tf(不要管ide的红线报错)import tf_slim as slim。添加tf.disable_v2_behavior()到首行即可修复。使用tensorflow 2.0以上版本,并且安装tf_slim。
AI-聂帅的博客AttributeError: in user code: C:/Users/Administrator/PycharmProjects/FAS-SGTD-master/fas_sgtd_multi_frame/generate_data_train.py:313 parser_fun... AttributeError: module 'tensorflow' has no attribute .