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!

Alert: Beginning Tuesday, June 25th, we will be freezing this site and migrating the content and forums to our new home at Check it out now!

Compiling MLP network throws error


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/ DeprecationWarning: Importing from numpy.testing.decorators is deprecated, import from numpy.testing instead.
from numpy.testing.decorators import setastest
/usr/lib/python3.5/importlib/ 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:******
2019-04-17 14:11:24.194841: I tensorflow/core/platform/] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
No Bias
No Bias
No Bias
No Bias
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/", line 83, in load_network
input_data, expected_result = p.calculateReference(arguments)
File "/usr/local/bin/ncsdk/Controllers/Parsers/", line 545, in calculateReference
File "/usr/local/lib/python3.5/dist-packages/numpy/core/", line 598, in transpose
return _wrapfunc(a, 'transpose', axes)
File "/usr/local/lib/python3.5/dist-packages/numpy/core/", 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!

Warm regards,


  • 2 Comments sorted by Votes Date Added
  • Hi @shehjar

    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.

    Best Regards,

  • Hi @Sahira_at_Intel

    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

This discussion has been closed.