Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ReadNetFromTensorflow - Unknown layer type problem

I have a problem...

I have generated model with this tutorial for my own classes: https://www.tensorflow.org/tutorials/image_retraining

By using:

ReadNetFromTensorflow("output_graph.pb");

I'm getting an error:

Unknown layer type Sub in op module_apply_default/hub_input/Sub

So I was trying to use freeze_graph.py

py C:\tensorflow-master\tensorflow\python\tools\freeze_graph.py --input_graph=output_graph.pb --input_checkpoint=C:/tmp/_retrain_checkpoint --output_graph=/tmp/frozen_graph.pb --output_node_names=softmax --input_binary=true

So error again:

Names_to_saveables must be a dict mapping string names to Tensors/Variables. Not a variable: Tensor("final_retrain_ops/biases/final_biases:0", shape=(6,), dtype=float32)

Then maybe optimize_for_inference.py Guess what...

Multiple error xD

WARNING:tensorflow:Didn't find expected Conv2D input to 'module_apply_default/MobilenetV2/expanded_conv_16/depthwise/BatchNorm/FusedBatchNorm'

Im trying to solve these problems from week. Can anyone help me with that?

ReadNetFromTensorflow - Unknown layer type problem

I have a problem...

I have generated model with this tutorial for my own classes: https://www.tensorflow.org/tutorials/image_retraining

By using:

ReadNetFromTensorflow("output_graph.pb");

I'm getting an error:

Unknown layer type Sub in op module_apply_default/hub_input/Sub

So I was trying to use freeze_graph.py

py C:\tensorflow-master\tensorflow\python\tools\freeze_graph.py --input_graph=output_graph.pb --input_checkpoint=C:/tmp/_retrain_checkpoint --output_graph=/tmp/frozen_graph.pb --output_node_names=softmax --input_binary=true

So error again:

Names_to_saveables must be a dict mapping string names to Tensors/Variables. Not a variable: Tensor("final_retrain_ops/biases/final_biases:0", shape=(6,), dtype=float32)

Then maybe optimize_for_inference.py Guess what...

Multiple error xD

WARNING:tensorflow:Didn't find expected Conv2D input to 'module_apply_default/MobilenetV2/expanded_conv_16/depthwise/BatchNorm/FusedBatchNorm'

Im trying to solve these problems from week. Can anyone help me with that?

Here is model files generated by retrain.py script which I cannot import to OpenCV: https://goo.gl/CPMPNY

These filse have been ganerated for flowers actually, not my own categories for now, becouse I haven't finished collectiong images, but it doesn't matter if its for cars or flowers, it still doesn't work with the same errors.