- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello! I'm trying to convert my own TF ResNet-20 model using the model optimizer but I encountered this error:
0 <mo.graph.graph.NodeWrap object at 0x7fc38c0709e8> [ 1 32 16 16] [ 1 32 16 -1]
[ ERROR ] -------------------------------------------------
[ ERROR ] ----------------- INTERNAL ERROR ----------------
[ ERROR ] Unexpected exception happened.
[ ERROR ] Please contact Model Optimizer developers and forward the following information:
[ ERROR ]
[ ERROR ] Traceback (most recent call last):
File "/opt/intel/computer_vision_sdk_fpga_2018.3.343/deployment_tools/model_optimizer/mo/main.py", line 321, in main
return driver(argv)
File "/opt/intel/computer_vision_sdk_fpga_2018.3.343/deployment_tools/model_optimizer/mo/main.py", line 263, in driver
mean_scale_values=mean_scale)
File "/opt/intel/computer_vision_sdk_fpga_2018.3.343/deployment_tools/model_optimizer/mo/pipeline/tf.py", line 219, in tf2nx
convert_batch_norm(graph)
File "/opt/intel/computer_vision_sdk_fpga_2018.3.343/deployment_tools/model_optimizer/mo/middle/passes/fusing/decomposition.py", line 61, in convert_batch_norm
_fused_batch_norm_decomposition(graph, tinput, toutput, const, beta, scale, shift, can_be_fused)
File "/opt/intel/computer_vision_sdk_fpga_2018.3.343/deployment_tools/model_optimizer/mo/middle/passes/fusing/decomposition.py", line 96, in _fused_batch_norm_decomposition
data_nodes=toutput)
File "/opt/intel/computer_vision_sdk_fpga_2018.3.343/deployment_tools/model_optimizer/mo/ops/op.py", line 179, in create_node_with_data
[np.array_equal(old_data_shape[id], data_node.shape) for id, data_node in enumerate(data_nodes)])
AssertionError
[ ERROR ] ---------------- END OF BUG REPORT --------------
[ ERROR ] -------------------------------------------------
The first line of the above error message is the info of the node that gave me this error. I attached my test script for conversion and the .pb file in the following link: https://drive.google.com/open?id=1uKyxnl0ty6wt_-KlYCAHIwbwqj5-mqkY
The .pb file runs well with the native TF python API for inference on GPU/CPU. Anyone could help? Thanks in advance!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The problem has been resolved. It's because the model I use uses channels_first as default for GPU training, while OPENVINO requires channels_last for TF models.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Glad to see you resolved your issue. I'll call this closed.
Kind Regards,
Monique Jones
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
lin, zhongyi wrote:The problem has been resolved. It's because the model I use uses channels_first as default for GPU training, while OPENVINO requires channels_last for TF models.
Zhongyi, how did you resolve this?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page