Python raise VALUE ERROR(张量(“检测”左/0:0右/0:0),shape=(),dtype=string)

Python raise VALUE ERROR(张量(“检测”左/0:0右/0:0),shape=(),dtype=string),python,tensorflow,keras,graph,training-data,Python,Tensorflow,Keras,Graph,Training Data,我试图在tensorflow2上训练我的目标检测模型,但我得到以下错误: raise ValueError( ValueError: Tensor("Detections_Left_Groundtruth_Right/0:0", shape=(), dtype=string) must be from the same graph as Tensor("Loss/TargetAssignment/AvgNumGroundtruthBox esPerImage:0&q

我试图在tensorflow2上训练我的目标检测模型,但我得到以下错误:

raise ValueError(
ValueError: Tensor("Detections_Left_Groundtruth_Right/0:0", shape=(), dtype=string) must be from the same graph as Tensor("Loss/TargetAssignment/AvgNumGroundtruthBox
esPerImage:0", shape=(), dtype=string) (graphs are FuncGraph(name=cond_true_31181, id=1177795211808) and <tensorflow.python.framework.ops.Graph object at 0x000001126
93BF400>).
raisevalueerror(
ValueError:Tensor(“Detections\u Left\u Groundtruth\u Right/0:0”,shape=(),dtype=string)必须来自与Tensor(“Loss/TargetAssignment/AvgNumGroundtruthBox”)相同的图形
esPerImage:0”,shape=(),dtype=string)(图是FuncGraph(name=cond_true_31181,id=117795211808)和)。
我找不到任何答案

在出现此错误之前,我必须修改ops.py updates函数,我不知道这是否与错误有关