frame

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!

Error 4: when compiling TF-model with tanh activation

I tried to compile two very basic models that I created in Keras and then saved as a TensorFlow model (I followed this guide).

First I had a model which used the LeakyReLU from Keras. Trying to compile this model using mvNCCompile I got the following error log:

mvNCCompile v02.00, Copyright @ Intel Corporation 2017
****** Info: No Weights provided. inferred path: tf_model.data-00000-of-00001******
tf_model.meta
2019-03-18 16:44:01.272627: 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
[Error 5] Toolkit Error: Stage Details Not Supported: leaky_re_lu_1/LeakyRelu/mul

So I did a quick search on which activations are supported by NCSDK and found tanh should be supported due to these release notes.
I trained a new model, now using tanh as activation. But this time I got the following error log:

mvNCCompile v02.00, Copyright @ Intel Corporation 2017
****** Info: No Weights provided. inferred path: tf_model.data-00000-of-00001******
tf_model.meta
2019-03-27 09:19:38.161469: 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
[Error 4] Toolkit Error: Stage Type Not Supported: Tanh

Please help me with that, as I don't know how to work around that error.

Comments

  • 2 Comments sorted by Votes Date Added
  • Hi @martin-online

    Which version of the NCSDK are you using?
    The top and bottom blobs have different names right? Can you attach your model here so I can take a look at it please?

    Best Regards,
    Sahira

  • Hi @Sahira_at_Intel ,

    thanks for your reply!
    I'm using the NCSDK version 2.10.01.01.

    That's the model.summary() of the simple model with tanh activation in the "activation_1" and softmax in "activation_2".


    Layer (type) Output Shape Param #
    =================================================================
    dense_1 (Dense) (None, 8) 328


    activation_1 (Activation) (None, 8) 0


    output (Dense) (None, 3) 27


    activation_2 (Activation) (None, 3) 0
    =================================================================
    Total params: 355
    Trainable params: 355
    Non-trainable params: 0


    Input: [<tf.Tensor 'dense_1_input:0' shape=(?, 40) dtype=float32>]
    Output: [<tf.Tensor 'activation_2/Softmax:0' shape=(?, 3) dtype=float32>]

    Here's visualisation as an image: https://imgur.com/Lx7ttfU

    Looking forward to your answer. =)

    Best regards,
    Martin

This discussion has been closed.