I'm currently trying to compile a tensorflow model (that I trained using keras) to run on the NCS Stick 1. This model will process raw data and no images or visual content of any type.
After days of trying, I have the feeling, that I can compile only those models with
mvNCCompile that have a 3D-input and have a Convolutional layer as the first layer after the input. Otherwise, I get the following error log:
user@ubuntu:~/dirpath4$ mvNCCompile TF_Model/tf_model.meta -in=dense_1_input_1 -on=dense_2_1/Sigmoid /usr/local/bin/ncsdk/Controllers/Parsers/TensorFlowParser/Convolution.py:47: SyntaxWarning: assertion is always true, perhaps remove parentheses? assert(False, "Layer type not supported by Convolution: " + obj.type) mvNCCompile v02.00, Copyright @ Intel Corporation 2017 ****** Info: No Weights provided. inferred path: TF_Model/tf_model.data-00000-of-00001****** TF_Model/tf_model.meta 2019-03-28 16:30:54.565036: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA No Bias No Bias Fusing DeptwiseConv + Pointwise Convolution into plain Convolution Fusing Add and Batch after Convolution Eliminate layers that have been parsed as NoOp Fusing Pad and Convolution2D Fusing Scale after Convolution or FullyConnect Fusing standalone postOps Fusing Permute and Flatten Fusing Eltwise and Relu Fusing Concat of Concats Evaluating input and weigths for each hw layer -------------------------------------- # Network Input tensors ['dense_1_input_1:0#13'] # Network Output tensors ['dense_2_1/Sigmoid:0#25'] Traceback (most recent call last): File "/usr/local/bin/mvNCCompile", line 208, in <module> args.old_parser, args.cpp, args) File "/usr/local/bin/mvNCCompile", line 186, in create_graph load_ret = load_network(args, parser, myriad_config) File "/usr/local/bin/ncsdk/Controllers/Scheduler.py", line 139, in load_network net, graphFile, finalLayers = phases.serializeNewFmt(parsedLayers, arguments, myriad_conf, input_data) File "/usr/local/bin/ncsdk/Controllers/Parsers/Phases.py", line 502, in serializeNewFmt adp.transform(parsedLayers) # TODO: DFS Transform? File "/usr/local/bin/ncsdk/Controllers/Adaptor.py", line 215, in transform self.net.attach(NetworkStageEmulator(l)) File "/usr/local/bin/ncsdk/Controllers/Adaptor.py", line 340, in __init__ self.specific_fields() File "/usr/local/bin/ncsdk/Controllers/Adaptor.py", line 348, in specific_fields self.definition.adapt_fields(self, _or) File "/usr/local/bin/ncsdk/Models/StageDefinitions/FCL.py", line 58, in adapt_fields w.reshape((1, o.shape, c, height * width)) File "/usr/local/bin/ncsdk/Controllers/Tensor.py", line 284, in reshape self.data = self.data.reshape(shape) ValueError: cannot reshape array of size 8 into shape (1,8,1,2)
In this example, the first layer after the input was a Dense layer with 8 units.
Can you please help me with getting this thing to run? :smile:
I replied on your other thread, but I'll post here too just in case (:
You're right, the NCSDK is only designed to run on convolutional neural networks. So when you input only raw data and no images, the Tensorflow parser checks the dimensions of the input and tries to process the input data. Since it's expecting a 3D input, it throws an error.
I hope this information was helpful. Please let us know if you have any further questions!