I am trying to compile a simple MLP network trained in tensorflow and I seem to be stuck with an error which goes like this -
root@shehjar-VirtualBox:/media/sf_VM_Share/mixing_filling/model# mvNCCompile tf_model.meta -s 0 -in=dense_input -on=dense_3/BiasAdd
/usr/lib/python3/dist-packages/scipy/stats/morestats.py:16: DeprecationWarning: Importing from numpy.testing.decorators is deprecated, import from numpy.testing instead.
from numpy.testing.decorators import setastest
/usr/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
return f(*args, **kwds)
mvNCCompile v02.00, Copyright @ Intel Corporation 2017
_* Info: No Weights provided. inferred path: tf_model.data-00000-of-00001_*
2019-04-17 14:11:24.194841: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
Fusing DeptwiseConv + Pointwise Convolution into plain Convolution
Fusing Add and Batch after Convolution
Traceback (most recent call last):
File "/usr/local/bin/mvNCCompile", line 208, in
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 83, in load_network
input_data, expected_result = p.calculateReference(arguments)
File "/usr/local/bin/ncsdk/Controllers/Parsers/TensorFlow.py", line 545, in calculateReference
File "/usr/local/lib/python3.5/dist-packages/numpy/core/fromnumeric.py", line 598, in transpose
return _wrapfunc(a, 'transpose', axes)
File "/usr/local/lib/python3.5/dist-packages/numpy/core/fromnumeric.py", line 51, in _wrapfunc
return getattr(obj, method)(*args, **kwds)
ValueError: axes don't match array
I am not sure why is it looking for convolutions. Is this device only for running image based networks (CNNs) ?
Really looking forward to your response!
The NCS _is_ only able to run CNNs. In theory, however, we should be able to support MLPs as long as you're using an image input. I have not tried to compile an MLP myself, so I cannot confirm this. But we do support networks with MLP in them because they're used in the final classification phase of CNN networks like GoogLeNet and MobileNetSSD - a typical CNN works as follows:
Input -> convolutional layers (conv, relu, pooling) -> full connected layers (or MLP used to “classify” the input) -> output
I hope this was helpful.
Thanks for the response. I was able to run it eventually using the --old-parser add on in the command line. I am not sure how it makes a difference. The other workaround is to keep the dummy input as a 4 dimensions and then squeeze it down to the necessary dimensions and compile that as input layer.
My team was currently planning to use this hardware for numeric and time series data too. So it seems counter-intuitive if it is only able to run CNNs.
Also, just out of curiosity, are conv1D layers also supported? i could try build a workaround for time series analysis using conv1D