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

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

Intel Movidius website: https://developer.movidius.com

Getting Started: https://developer.movidius.com/start

NCSDK documentation: https://developer.movidius.com/docs

Neural Compute SDK: https://developer.movidius.com/repo

NCAppZoo: https://developer.movidius.com/examples

Neural Compute blog: https://developer.movidius.com/blog

Getting Started: https://developer.movidius.com/start

NCSDK documentation: https://developer.movidius.com/docs

Neural Compute SDK: https://developer.movidius.com/repo

NCAppZoo: https://developer.movidius.com/examples

Neural Compute blog: https://developer.movidius.com/blog

Hi!

I've build a tensorflow model consisting of two convolutional and two fully connected layers. Then I initialize it with random variables, evaluate it on a np.ones vector and save the model.

```
input = tf.placeholder("float16", [1, 1604,9,1], name="x")
output = fc_gest(conv(input)) #output from my model
print(output)
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
saver = tf.train.Saver(tf.global_variables())
inp = np.ones((1,1604,9,1),dtype ="float16")
print('eval: ',np.float16(output.eval({input:inp})))
saver.save(sess, "./saved_sess/model.ckpts")
```

this code gives me ''add_3' as the name of my output vector and [[ 3.90820312 5.2890625 6.06640625 3.36328125 -4.046875

-6.26171875 10.546875 ]] a result of passing np.ones to my model.

I then generate a graph file with the command mvNCCompile model.ckpts.meta -in=x -on=add_3

After I get the graph file I load it to the stick and pass the same np.ones vector:

```
print("allocating graph")
graph = device.AllocateGraph(graphfile)
print("loading tensor")
inp = np.ones(([1,1604,9,1]),dtype ="float16")
graph.LoadTensor(inp, 'x')
print("computing result")
output, userobj = graph.GetResult()
print(np.float16(output))
print(output.shape)
```

the output of this is

allocating graph

loading tensor

computing result

[ nan nan nan nan nan nan nan]

(7,)

This time it's just nan's. If I make the model smaller it outputs numbers but they still don't match the TF output.

WHY?

## Comments

2 Commentssorted by Votes Date Added0Vote UpVote Down@grisha In order to help debug your problem, I'd like to reproduce the issue you faced. If you could provide a link to the script you used in this post, it would save me a lot of time. Thanks.

0Vote UpVote Down@Tome_at_Intel I have partially solved the problem. I had to exclude addition operation from my graph and reshape it to be a square with three channels.