OnnxToCaffe2 - Incompatible ConvTranspose operator

Hello, noob here - apologies in advance if this is a stupid question.

I’m attempting to load an ONNX model in Caffe2 using: caffe2::onnx::Caffe2Backend::Prepare(const std::string & onnx_model_str, const std::string & device, const std::vector<caffe2::onnx::Caffe2Ops,std::allocatorcaffe2::onnx::Caffe2Ops> & extras)

I’m getting the following error:
“Don’t know how to map unexpected argument ‘group’ (from operator ConvTranspose)”.

If I load the same model as Caffe2 prototext (by converting offline to init/predict via c2.onnx_graph_to_caffe2_net), I don’t have any issues.

Investigating the error, it seems that Caffe2’s ConvTranspose expects the following args: legacy_pad, kernels, strides, pads, adjs, order, shared_buffer, no_bias, whereas ONNX’s ConvTranspose assumes the following: auto_pad, dilations, group, kernel_shape, output_padding, output_shape, pads, strides.

Looks like the ‘group’ argument was added on April 4 2019 to the Caffe2 operator :

But the Caffe2 ONNX backend schema wasn’t changed and it doesn’t seem to have kept up with ONNX itself.


  1. Is my interpretation correct?
  2. If yes, is OnnxNodeToCaffe2Ops (caffe2\onnx\backend.cc) maintained/supported? Can I rely on loading ONNX models directly in Caffe2?

Thanks so much!