tensorflow-deeplab-resnet icon indicating copy to clipboard operation
tensorflow-deeplab-resnet copied to clipboard

Running evaluation on images of different size

Open burhanbvk opened this issue 7 years ago • 1 comments

Hello,

I am trying to create a service that evaluates images. To improve performance I am trying to use the same network on all images. I use inference.py as a starting point and I moved the net variable to the global scope using the following code:

img_ph = tf.placeholder(tf.float32, shape = [None, None, None, 3]) net = DeepLabResNetModel({'data': img_ph}, is_training=False, num_classes=NUM_CLASSES)

But I get the following error when I evaluate an image:

File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\ops.py", line 5573, in _assert_same_graph original_item)) ValueError: Tensor("strided_slice:0", shape=(2,), dtype=int32) must be from the same graph as Tensor("fc_out/Conv2D:0", shape=(?, ?, ?, 27), dtype=float32).

Thanks for any pointers.

burhanbvk avatar Jun 05 '18 01:06 burhanbvk

I am not sure where this is coming from

Tensor("fc_out/Conv2D:0", shape=(?, ?, ?, 27), dtype=float32)

Did you modify the network? If so, it is better if you provide more description; otherwise, I might not be able to help at all

DrSleep avatar Jul 27 '18 04:07 DrSleep