question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unsupported Ops of type: SplitV

See original GitHub issue

Relevant information from pip freeze:

coremltools==3.0b3
tensorflow==1.12.0
tfcoreml==0.4.0b1

Script used:

import tfcoreml as tf_converter

tf_graph_path = '/wayfair/home/ns242e/od_133/tiny/tiny-v1/train-v1_best.pb'
coreml_graph_path = tf_graph_path.replace('.pb', '.mlmodel')

coreml_model = tf_converter.convert(
    tf_model_path=tf_graph_path,
    mlmodel_path=coreml_graph_path,
    output_feature_names=['output_boxes:0'],
    input_name_shape_dict={'inputs:0': [1, 416, 416, 3]},
)

Script output:

Loading the TF graph...
2019-07-25 14:03:50.019583: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 AVX512F
Graph Loaded.
Now finding ops in the TF graph that can be dropped for inference
Collecting all the 'Const' ops from the graph, by running it....
Done.
Traceback (most recent call last):
  File "/wayfair/home/ns242e/repos/od-yolo/translation/tensorflow_to_coreml.py", line 18, in <module>
    input_name_shape_dict={'inputs:0': [1, 416, 416, 3]},
  File "/wayfair/home/ns242e/repos/od-yolo/venv/lib/python3.6/site-packages/tfcoreml/_tf_coreml_converter.py", line 621, in convert
    custom_conversion_functions=custom_conversion_functions)
  File "/wayfair/home/ns242e/repos/od-yolo/venv/lib/python3.6/site-packages/tfcoreml/_tf_coreml_converter.py", line 294, in _convert_pb_to_mlmodel
    _check_unsupported_ops(OPS, output_feature_names, effectively_constant_ops + unused_ops)
  File "/wayfair/home/ns242e/repos/od-yolo/venv/lib/python3.6/site-packages/tfcoreml/_tf_coreml_converter.py", line 123, in _check_unsupported_ops
    ','.join(unsupported_op_types)))
NotImplementedError: Unsupported Ops of type: SplitV

You can find the frozen graph used here.

I understand that SplitV is not explicitly converted, but could the SplitV operation in the graph be converted to a Split operation, which is supported?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

2reactions
fellowProgrammercommented, Feb 5, 2020

I added that I am now getting another error:

ValueError: Incompatible dimension 3 in Sub operation detector/darknet-53/Conv/BatchNorm/FusedBatchNorm/Sub

Any idea how to fix this? I am using tensorflow-gpu==1.13.1 on Google COLAB. I used the YOLOv3-SPP Model if that is any help.

0reactions
1duocommented, Feb 5, 2020

@fellowProgrammer Can you providing minimum_ios_deployment_target='13' in your convert call. This op is provided in iOS 13 or later.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why Unsupported Ops in the model before optimization ...
I tested TensorFlow 1.11 and 1.12, I use TFRecordDataset and an Iterator but I have no idea why Op 'IteratorV2' and not Op...
Read more >
Accelerating Inference in TensorFlow with TensorRT User Guide
The conversion report details the type and number of ops that were not converted, and the reason for their failure to convert. This...
Read more >
Supported ONNX Ops - Qualcomm Developer Network
Operator Opset Version Supported Notes Abs 1,6 ‑ And 1,7 ‑ AveragePool 1,7,10,11 (2)
Read more >
Failed to convert a NumPy array to a Tensor (Unsupported ...
... a NumPy array to a Tensor (Unsupported object type float) in Python ... we could return 985 # ops.convert_to_tensor(x, dtype=dtype, .
Read more >
TensorFlow Lite and TensorFlow operator compatibility
Supported operators; Supported types; Straight-forward conversions, constant-folding and fusing; Experimental Operations.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found