- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to build a model for the NCS that does nothing. When compiling the model I get an error
shape: (400, 400)
res.shape: (400, 400)
TensorFlow output shape: (1, 400, 400)
Traceback (most recent call last):
File "/usr/local/bin/mvNCCompile", line 169, in <module>
create_graph(args.network, args.image, args.inputnode, args.outputnode, args.outfile, args.nshaves, args.inputsize, args.weights, args.explicit_concat, args.ma2480, args.scheduler, args.new_parser, args)
File "/usr/local/bin/mvNCCompile", line 148, in create_graph
load_ret = load_network(args, parser, myriad_config)
File "/usr/local/bin/ncsdk/Controllers/Scheduler.py", line 110, in load_network
network.optimize()
File "/usr/local/bin/ncsdk/Models/Network.py", line 250, in optimize
self.convert_network_input_to_yxz()
File "/usr/local/bin/ncsdk/Models/Network.py", line 337, in convert_network_input_to_yxz
if self.stageslist[0].op in [StageType.fully_connected_layer, StageType.convolution, StageType.max_pooling,
IndexError: list index out of range
My model is build as follows:
import tensorflow as tf
import numpy as np
def main(_):
graph = tf.Graph()
with graph.as_default():
with tf.Session(graph=graph) as sess:
x = tf.placeholder(tf.float32, [400, 400], name='input')
for n in tf.get_default_graph().as_graph_def().node:
print(n.name + ": " + n.op)
sess.run(tf.global_variables_initializer())
sess.run(tf.local_variables_initializer())
# test model
in_tensor = tf.get_default_graph().get_tensor_by_name('input:0')
input_data = np.random.rand(400, 400).astype(np.float32)
known = sess.run('input:0', {in_tensor: input_data})
print('Result: ' + str(known))
# attempts to use saver but fails due to no variables to save
#saver = tf.train.Saver(tf.global_variables())
#saver.save(sess, './empty')
tf.train.write_graph(sess.graph_def, './', 'empty.pb', as_text=False)
tf.app.run(main=main)
Any idea on how to get past this hurdle?
- Tags:
- Tensorflow
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
oh bro,
you can use mvNCCheck tools to check if your model has been translate successfully,
the tool's documentation in this site : https://movidius.github.io/ncsdk/tools/check.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
bro, mvNCCheck gives me the same error…
my guess is it doesn't like that the model doesn't have any weights
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page