我正在尝试创建一个评估图像的服务。为了提高性能,我尝试在所有图像上使用相同的网络。我使用inference.py作为起点(https://github.com/hellochick/Indoor-segmentation/blob/master/inference.py),并将net变量移至全局作用域,将其更改为:
img_ph = tf.placeholder(tf.float32, shape = [None, None, None, 3])
net = DeepLabResNetModel({'data': img_ph}, is_training=False, num_classes=NUM_CLASSES)但是当我评估一个图像时,我得到了以下错误:
输出文件"\Python36\lib\site-packages\tensorflow\python\framework\ops.py",第5573行,在_assert_same_graph original_item中)) ValueError: Tensor("strided_slice:0",shape=(2,),dtype=int32)必须来自与张量相同的图形(“fc_out/Conv2D:0”,shape=(?,27),dtype=float32)。
它在装有Python3的Windows服务器上运行。
谢谢你的指点。
https://stackoverflow.com/questions/50703450
复制相似问题