Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6574 Discussions

Error 5 or Error 34 Converting custom tensorflow model

idata
Employee
2,554 Views

Hi,

 

I'm trying to convert a tensorflow model using mvNCCompile

 

If the input tensor is a "uint8" shape 1,None,None,3 I got the following error:

 

[Error 34] Setup Error: Values for input contain placeholder. Pass an absolute value.

 

so I changed the input tensor to "float" 1,330,330,3 (fixed size) but now I got the following error:

 

[Error 5] Toolkit Error: Stage Details Not Supported: Cast

 

I have no idea how to debug this further, thanks for any help in advance.

 

Cheers

 

Dominik
0 Kudos
17 Replies
idata
Employee
2,254 Views

@dhelleberg, do you mind sharing your prototxt file?

0 Kudos
idata
Employee
2,254 Views

Yes sure!

 

https://drive.google.com/file/d/1Te4qxHO_7uV89OECgebky-fVJaTme3Mj/view?usp=sharing

 

It's basically a retrained model from the tensorflow object detection framework:

 

https://github.com/tensorflow/models/tree/master/research/object_detection

 

I use the ssd_mobilenet_v1_coco model.

 

I run the following command for conversion:

 

mvNCCompile model.ckpt.meta -s 12 -in image_tensor -on detection_boxes

0 Kudos
idata
Employee
2,254 Views

@dhelleberg, Please do a guide if you get success in inference using ssd_mobilenet.

 

Thank You.
0 Kudos
idata
Employee
2,254 Views

I will, but I'm stuck with the errors above, hoping for help…

0 Kudos
idata
Employee
2,254 Views

@dhelleberg, we are working enabling MobileNet_SSD trained on Caffe. It should be out in our next release.

0 Kudos
idata
Employee
2,254 Views

I'm getting the same error with InceptionV1Resnet. I will post the weights if someone can test it.

0 Kudos
idata
Employee
2,254 Views

@dhelleberg I am using mobilenet-ssd caffe from here: https://github.com/chuanqi305/MobileNet-SSD.

 

I was able to generate graph file but I am stuck at output as it gives NaN. I am wiling to contribute to tensorflow implementation also . Let me know if you were able to get any breakthrough here .
0 Kudos
idata
Employee
2,254 Views

Hello, I've been working on something similar to this, but changing the gray scale format of MNIST to an RGB format, to use it with the chip. but I get error 34:

 

[Error 34] Setup Error: Values for input contain placeholder. Pass an absolute value.

 

What do you mean with "absolute value"?

 

What is the correct format to declare the input and output tensors?

 

I searched the Internet for the solution and I can not find it. I've been in this for two weeks. I have not found any developer that has been able to run their own Tensorflow program and share their code. Please upload an example code with a simple program, train the network, save the model and then upload it to the NCS.

 

It is the minimum of documentation that should exist!!
0 Kudos
idata
Employee
2,254 Views
0 Kudos
idata
Employee
2,254 Views

"[Error 5] Toolkit Error: Stage Details Not Supported: Cast"

 

I get this error with retrained MobileNetV1, is this resolved in the current release???
0 Kudos
idata
Employee
2,254 Views

@chinthysl We have support for various versions of MobileNet V1. You can see the list at https://github.com/movidius/ncsdk/releases and build the models using the ncappzoo sample https://github.com/movidius/ncappzoo/tree/ncsdk2/tensorflow/mobilenets. You can specify the image input size and depth multiplier for the Mobilnet model you want using this app.

0 Kudos
idata
Employee
2,254 Views

@Tome_at_Intel hello,Tome. I've been warking on mobilenet SSD, and also got the [Error 5]. I guess NCS may not support this operation(Cast). Then I discovered that MobileNet V1 can work normally. So, I print the operations which are used in MobileNet V1. It looks like this:

 

     

  • {'Const', 'FusedBatchNorm', 'Squeeze', 'Relu6', 'Conv2D', 'Softmax', 'Reshape', 'BiasAdd', 'Identity', 'AvgPool', 'Placeholder', 'DepthwiseConv2dNative'}
  •  

 

And, the operations which are used in ssd_mobilenet_v1 but not used in MobileNet V1 likes below:

 

     

  • {'Shape', 'Merge', 'ResizeBilinear', 'TensorArrayWriteV3', 'Split', 'StridedSlice', 'Enter', 'Exit', 'GreaterEqual', 'All', 'Where', 'NextIteration', 'LogicalAnd', 'Minimum', 'ConcatV2', 'TensorArrayScatterV3', 'Add', 'Exp', 'TensorArraySizeV3', 'Less', 'LoopCond', 'RealDiv', 'Switch', 'NonMaxSuppressionV2', 'Range', 'Fill', 'Tile', 'ZerosLike', 'Cast', 'Gather', 'TopKV2', 'Transpose', 'TensorArrayV3', 'Mul', 'Slice', 'Equal', 'Size', 'TensorArrayGatherV3', 'Maximum', 'Sub', 'Sigmoid', 'Unpack', 'Pack', 'ExpandDims', 'TensorArrayReadV3', 'Greater', 'Assert'}
  •  

 

As we can see, there are many different operations between the two Neural Network. 'Cast' is included in this list. I am not sure that if I remove the Cast operation ,will the rest work normally? Is it possible i make ssd mobilenet working on NCS? is there a list which include some tensorflow operation supported by NCS?

0 Kudos
idata
Employee
2,254 Views

@Ryan At the moment, the current NCSDK (2.04.00.06) doesn't have support for SSD MobileNet on the TensorFlow framework. The issue is that we have not implemented all of the layers needed for SSD MobileNet for TensorFlow (cast being just one of them). This feature request (SSD MobileNet for TensorFlow) is an issue that we are aware of and one that we are working on.

 

That being said, the NCSDK does have support for SSD MobileNet for Caffe and you can efficiently retrain the model using https://github.com/listenlink/caffe/tree/ssd.

0 Kudos
idata
Employee
2,254 Views

@Tome_at_Intel thanks for your answer. I have found the list of tensorflow operations supported by NCS in your source code :p . And I am working on caffe SSD MobileNet.

0 Kudos
idata
Employee
2,254 Views

@Tome_at_Intel Can you tell us roughly when Tensorflow SSD Mobilenet v1 will be supported by NCS?

0 Kudos
idata
Employee
2,254 Views

@cwong I don't have a roadmap or date at the moment.

0 Kudos
idata
Employee
2,254 Views

@Tome_at_Intel Hi Tome. I have another problem. Can you help me? please !!!

 

https://ncsforum.movidius.com/discussion/933/ncs-can-t-be-opened-when-it-changes-to-vsc-mode?new=1
0 Kudos
Reply