Python 我试图定义一个微调过的vgg16对象,但错误是I';我总是使用两个不同的图形 这是定义部分 x=tf.placeholder(tf.float32,shape=[None,224,3]) tf.reset_default_graph() vgg=model.vgg16(x) 微调vgg16类的一部分 vgg16类: 定义初始化(自我,imgs): self.parameters=[] self.imgs=imgs self.convlayers() self.fc_层()

Python 我试图定义一个微调过的vgg16对象,但错误是I';我总是使用两个不同的图形 这是定义部分 x=tf.placeholder(tf.float32,shape=[None,224,3]) tf.reset_default_graph() vgg=model.vgg16(x) 微调vgg16类的一部分 vgg16类: 定义初始化(自我,imgs): self.parameters=[] self.imgs=imgs self.convlayers() self.fc_层(),python,tensorflow,Python,Tensorflow,错误是: ValueError: Tensor("Placeholder:0", shape=(?, 224, 224, 3), dtype=float32) must be from the same graph as Tensor("conv1_1/weights:0", shape=(3, 3, 3, 64), dtype=float32_ref). 你的问题现在解决了吗?否则,错误告诉您存在多个tensorflow计算图,并且您正在尝试组合来自不

错误是:

ValueError: Tensor("Placeholder:0", shape=(?, 224, 224, 3), dtype=float32) must be from the same graph as Tensor("conv1_1/weights:0", shape=(3, 3, 3, 64), dtype=float32_ref).

你的问题现在解决了吗?否则,错误告诉您存在多个tensorflow计算图,并且您正在尝试组合来自不同图的操作。请不要使用
tf.reset\u default\u graph()
进行尝试。如果没有,请分享完整的可复制代码,以便我可以帮助您。谢谢你的问题现在解决了吗?否则,错误告诉您存在多个tensorflow计算图,并且您正在尝试组合来自不同图的操作。请不要使用
tf.reset\u default\u graph()
进行尝试。如果没有,请分享完整的可复制代码,以便我可以帮助您。谢谢