这是回溯:
File "C:\tensorflow1\models\research\slim\nets\inception_resnet_v2.py",line 373,in <module>
batch_norm_updates_collections=tf.compat.v1.GraphKey.UPDATE_OPS,AttributeError: module 'tensorflow._api.v1.compat.v1' has no attribute 'GraphKey'
代码如下:
def inception_resnet_v2_arg_scope(
weight_decay=0.00004,batch_norm_decay=0.9997,batch_norm_epsilon=0.001,activation_fn=tf.nn.relu,batch_norm_updates_collections=tf.compat.v1.GraphKey.UPDATE_OPS,batch_norm_scale=False):
我尝试使用tf版本1和2。