【发布时间】:2018-06-05 15:11:38
【问题描述】:
我正在尝试创建一个评估图像的服务。为了提高性能,我尝试在所有图像上使用相同的网络。我使用 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) 必须来自 与 Tensor("fc_out/Conv2D:0", shape=(?, ?, ?, 27), dtype=float32)。
这是在带有 Python3 的 Windows 服务器上运行的。
感谢您的任何指点。
【问题讨论】:
标签: tensorflow