onnx-pytorch icon indicating copy to clipboard operation
onnx-pytorch copied to clipboard

Error to convert a U-Net using mobilevnet2 backbone

Open nmoran opened this issue 3 years ago • 3 comments

Trying to convert a UNet with mobileunetv2 backbone using

from onnx_pytorch import code_gen
code_gen.gen("model.onnx", "./")

gives

OpCodeGenerator is unimplemented for Clip

nmoran avatar May 13 '21 10:05 nmoran

@nmoran I think you installed by pip install onnx-pytorch. Try install from source by pip install -e . I haven't released to PyPI for a while.

fumihwh avatar May 13 '21 12:05 fumihwh

And I check the unet, there are also some ops not supported yet.

fumihwh avatar May 13 '21 12:05 fumihwh

@nmoran You could checkout develop branch. I've implemented ConvTranspose, Pad and Resize. BUT they are not fully tested. I can't ensure consistency between ONNX and PyTorch code.

Update: FYI, I've add continue_on_error feature, you could use following API and pass continue_on_error=True to gen. Then modify code later by youself.

gen(onnx_model,
        output_dir,
        overwrite=False,
        tensor_inplace=False,
        simplify_names=False,
        continue_on_error=False)

fumihwh avatar May 13 '21 14:05 fumihwh