'Error while trying to convert model from ONNX to Tensorflow due to Resize (MXnet original framework)

I'm trying to convert a model from ONNX model to TF and I'm facing the following issue

RuntimeError: Resize coordinate_transformation_mode=half_pixel and  mode=nearest is not supported in Tensorflow.

The original model from which I've obtained the onnx model is from MXNET.

code snippet:

import onnx 
from onnx_tf.backend import prepare

onnx_model = onnx.load(onnx_file)
tf_rep = prepare(onnx_model, strict=True)

pb_path = "./weights/converted/exported.pb"
tf_rep.export_graph(pb_path)

I'm using:

tensorflow-addons            0.15.0   
tensorflow-gpu               2.7.0    
tensorflow-probability       0.15.0  
onnx                         1.10.2   
onnx-tf                      1.9.0    
onnxruntime                  1.10.0   

Anyone know how this issue con be solve?

Edit the problem seems to be from this mxnet layer layer

  "op": "UpSampling", 
  "name": "rf_c3_upsampling", 
  "attrs": {
    "num_args": "1", 
    "sample_type": "nearest", 
    "scale": "2", 
    "workspace": "512"


Solution 1:[1]

You may need to change the parameters of interpolate(). See the answer here: Exception when converting Unet from pytorch to onnx

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Yohai Devir