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 5] Toolkit Error: Stage Details Not Supported: VarHandleOp

I just prototyping a model in tf.keras following the link below:
https://www.dlology.com/blog/how-to-run-keras-model-on-movidius-neural-compute-stick/

I converted my Keras model to tensorflow, but when I tried to compile my tensorflow model to graph, it gives me error below:
[Error 5] Toolkit Error: Stage Details Not Supported: VarHandleOp

my tensorflow version is 1.9.0

my model:

#

model = models.Sequential()
model.add(layers.Flatten(input_shape=(28,28)))
model.add(layers.Dense(128,activation='relu'))
model.add(layers.Dense(128,activation='relu'))
model.add(layers.Dense(10,activation='softmax'))

model.compile(optimizer='adam',loss = 'sparse_categorical_crossentropy',metrics=['accuracy'])

#

using this command to compile:

#

mvNCCompile tf_model.meta -in=flatten_1_input -on=dense_5/Softmax

#

error:

#

mvNCCompile v02.00, Copyright @ Intel Corporation 2017

****** Info: No Weights provided. inferred path: tf_model.data-00000-of-00001******
shape: [1, 28, 28]
[Error 5] Toolkit Error: Stage Details Not Supported: VarHandleOp

#

I have tried another model structure but I ended up facing the same error

Thank you.

Comments

  • 3 Comments sorted by Votes Date Added
  • I am facing the same issue. I have taken inception_v3 and did transfer learning on it by adding last layer as dense. I have used tf.saved_model.simple_save to export the model.

    Following is the error I get:

    pi@raspberrypi:~$ mvNCCompile -s 12 _retrain_checkpoint.meta -in=Placeholder -on=final_result -o first_graph.graph             
    /usr/lib/python3/dist-packages/scipy/_lib/_numpy_compat.py:10: DeprecationWarning: Importing from numpy.testing.nosetester is deprecated since 1.15.0, import 
    from numpy.testing instead.                                                                                                                                   
      from numpy.testing.nosetester import import_nose                                                                                                            
    /usr/lib/python3/dist-packages/scipy/stats/morestats.py:16: DeprecationWarning: Importing from numpy.testing.decorators is deprecated since numpy 1.15.0, impo
    rt from numpy.testing instead.                                                                                                                                
      from numpy.testing.decorators import setastest                                                                                                              
    /usr/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: compiletime version 3.4 of module 'tensorflow.python.framework.fast_tensor_util' does not matc
    h runtime version 3.5                                                                                                                                         
      return f(*args, **kwds)                                                                                                                                     
    /usr/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: builtins.type size changed, may indicate binary incompatibility. Expected 432, got 412        
      return f(*args, **kwds)                                                                                                                                     
    /usr/local/bin/ncsdk/Controllers/Parsers/TensorFlowParser/Convolution.py:46: SyntaxWarning: assertion is always true, perhaps remove parentheses?             
      assert(False, "Layer type not supported by Convolution: " + obj.type)                                                                                       
    /usr/local/bin/ncsdk/Controllers/Parsers/Phases.py:322: SyntaxWarning: assertion is always true, perhaps remove parentheses?                                  
      assert(len(pred) == 1, "Slice not supported to have >1 predecessors")                                                                                       
    mvNCCompile v02.00, Copyright @ Intel Corporation 2017                                                                                                        
    
    ****** Info: No Weights provided. inferred path: _retrain_checkpoint.data-00000-of-00001******                                                                
    WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py:1266: checkpoint_exists (from tensorflow.python.training.ch
    eckpoint_management) is deprecated and will be removed in a future version.                                                                                   
    Instructions for updating:                                                                                                                                    
    Use standard file APIs to check for files with this prefix.                                                                                                   
    shape: [1, 299, 299, 3]                                                                                                                                       
    [Error 5] Toolkit Error: Stage Details Not Supported: VarHandleOp
    

    I have confirmed the name of the in and out layers by sess.graph.get_operations().

    I am thinking may be it is because of the variables defined in the network?

  • Hi @ddvoviyum
    The "Stage Details Not Supported: VarHandleOp" error is given when you're using operations or layers that aren't yet supported. These errors can get tricky sometimes. Can you share your model and exact steps and I will try to reproduce and get back to you with results.

    Best Regards,
    Sahira

  • Thanks for the response @Sahira_at_Intel
    Here are the steps to reproduce:

    Base script used:
    https://github.com/tensorflow/hub/raw/master/examples/image_retraining/retrain.py

    Changes made:
    1. Changed module to https://tfhub.dev/google/imagenet/inception_v3/feature_vector/1
    2. Used custom dataset of 3 classes instead of the default flower example
    3. Extracted final result files (checkpoints, .meta etc)
    4. Ran mvNCCompile -s 12 _retrain_checkpoint.meta -in=Placeholder -on=final_result

Sign In or Register to comment.