Conversion problems for Conv3D

Hi there,

I am trying to convert a PyTorch model which uses a 3D convolution to be used with Tensorflow.js for inference.

I saved my PyTorch model in ONNX (with torch.onnx.export) and then converted to a TF Saved Model with the following Python code:

import onnx
from   onnx_tf.backend import prepare

onnx_model = onnx.load('path/to/my/onnx/model')
tf_model = prepare(onnx_model)
tf_model.export_graph('model')

The above procedure generates a ‘model’ directory with contains the .pb file and other stuff.

Then I run the conversion tool:

tensorflowjs_converter --input_format=tf_saved_model model model_tfjs

and I get the following error:

[... omitted stack trace ...]
ValueError: Unsupported Ops in the model before optimization
Conv3DBackpropInputV2

Is there any chance to have the Conv3D backprop op to be enabled (or ignored) in tfjs converter?
Please note that I don’t need to backprop at the web client, but just use the model for inference.

Thank you so much,
m.

Hi @Marco_Di_Benedetto ,

I apologize for the delay in my response. The Conv3DTranspose layer has been implemented in TFJS. You can convert the model that contains the 3D transposed convolution layer. You can find the related PR here: #2641.

Thank You!!