Skip to content

ValueError: tensorflow op ResizeBicubic is not supported #294

@thefiddler

Description

@thefiddler

When converting the attached model I am getting an error that bicubic resampling is not supported.

python -m tf2onnx.convert --input model.pb --inputs image:0 --outputs segmentation:0 --fold_const

using tensorflow=1.12.0, onnx=1.4.1, opset=7, tfonnx=0.4.0/209e06
2019-01-29 11:40:48.744284: I tensorflow/tools/graph_transforms/transform_graph.cc:317] Applying fold_constants
2019-01-29 11:40:48.757588: I tensorflow/tools/graph_transforms/transform_graph.cc:317] Applying remove_attribute
2019-01-29 11:40:48.757800: I tensorflow/tools/graph_transforms/transform_graph.cc:317] Applying fold_batch_norms
2019-01-29 11:40:48.758288: I tensorflow/tools/graph_transforms/transform_graph.cc:317] Applying fold_old_batch_norms
2019-01-29 11:40:48.764933: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "~/.virtualenvs/onnx/lib/python3.7/site-packages/tf2onnx/convert.py", line 119, in <module>
    main()
  File "~/.virtualenvs/onnx/lib/python3.7/site-packages/tf2onnx/convert.py", line 102, in main
    inputs_as_nchw=args.inputs_as_nchw)
  File "~/.virtualenvs/onnx/lib/python3.7/site-packages/tf2onnx/tfonnx.py", line 2506, in process_tf_graph
    mapped_op, unmapped_op = tensorflow_onnx_mapping(g, continue_on_error, custom_op_handlers)
  File "~/.virtualenvs/onnx/lib/python3.7/site-packages/tf2onnx/tfonnx.py", line 2319, in tensorflow_onnx_mapping
    raise ValueError("tensorflow op " + op + " is not supported")
ValueError: tensorflow op ResizeBicubic is not supported

The model tries to resize the input image to 256x256 using bicubic interpolation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions