'tensorflow2.20中bao'cuoAttributeError: module 'tensorflow' has no attribute 'variable_scope'???

with tf.variable_scope("inference"): # 命名作用域 是inference
image_net = vgg_net(weights, processed_image) # 传入权重参数和预测图像,获得所有层输出结果
conv_final_layer = image_net["conv5_3"] # 获得输出结果

    pool5 = utils.max_pool_2x2(conv_final_layer)                    # /32 缩小32倍

    W6 = utils.weight_variable([7, 7, 512, 4096], name="W6")        # 初始化第6层的w b
    b6 = utils.bias_variable([4096], name="b6")
    conv6 = utils.conv2d_basic(pool5, W6, b6)
    relu6 = tf.nn.relu(conv6, name="relu6")

https://blog.csdn.net/lumping/article/details/107182476