frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Custom Tensorflow model, output tensor shape error

Hi,

I compiled the TF sample and that works fine on my stick. I am trying to run a TF model I wrote, but I keep getting the following error when compiling:

Traceback (most recent call last):
  File "/usr/local/bin/mvNCCompile", line 118, in <module>
    create_graph(args.network, args.inputnode, args.outputnode, args.outfile, args.nshaves, args.inputsize, args.weights)
  File "/usr/local/bin/mvNCCompile", line 104, in create_graph
    net = parse_tensor(args, myriad_config)
  File "/usr/local/bin/ncsdk/Controllers/TensorFlowParser.py", line 889, in parse_tensor
    node.outputs[0].set_shape(desired_shape)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/framework/ops.py", line 378, in set_shape
    self._shape = self._shape.merge_with(shape)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/framework/tensor_shape.py", line 555, in merge_with
    other = as_shape(other)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/framework/tensor_shape.py", line 833, in as_shape
    return TensorShape(shape)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/framework/tensor_shape.py", line 439, in __init__
    self._dims = [as_dimension(d) for d in dims_iter]
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/framework/tensor_shape.py", line 439, in <listcomp>
    self._dims = [as_dimension(d) for d in dims_iter]
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/framework/tensor_shape.py", line 381, in as_dimension
    return Dimension(value)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/framework/tensor_shape.py", line 37, in __init__
    raise ValueError("Dimension %d must be >= 0" % self._value)
ValueError: Dimension -1 must be >= 0

Ive set the shape of the output tensor and also tried just specifying the input tensor as output tensor directly for evaluation, but I keep getting the same error. Does anyone have any idea what I'm doing wrong?

Thanks

Sign In or Register to comment.