onnx2pytorch icon indicating copy to clipboard operation
onnx2pytorch copied to clipboard

NotImplementedError: auto_pad=VALID functionality not implemented.

Open boy-be-ambitious opened this issue 4 years ago • 5 comments

When using latest onnx2pytorch.ConvertModel to import onnx model, it raise this error: NotImplementedError: auto_pad=VALID functionality not implemented.

boy-be-ambitious avatar May 10 '21 06:05 boy-be-ambitious

I'm having a similar issue with NotImplementedError: auto_pad=SAME_UPPER functionality not implemented

mlizhardy avatar May 26 '21 20:05 mlizhardy

looks like from https://github.com/onnx/onnx/blob/master/docs/Operators.md that VALID is padding=0, and SAME_UPPER and SAME_LOWER are padding = ciel(kernel_size/2)

mlizhardy avatar May 26 '21 21:05 mlizhardy

looks like from https://github.com/onnx/onnx/blob/master/docs/Operators.md that VALID is padding=0, and SAME_UPPER and SAME_LOWER are padding = ciel(kernel_size/2)

So, what can I do to solve this issue? I just have a model, no code. Must I wait the author to solve this issue?

boy-be-ambitious avatar May 27 '21 02:05 boy-be-ambitious

Currently it's not implemented, so you're probably out of luck without code. But auto_pad is getting deprecated across ONNX, so if you're able to get access to a newer model, you'll be less likely to have this issue.

Adding to the issue, we can't do a SAME_UPPER too, and a manual workaround is to add a pass in the else clause, though that of course doesn't replicate the ONNX file into PyTorch 1:1, so that's a huge con.

Arka161 avatar Dec 01 '21 16:12 Arka161

Fixed in v0.5.2

Talmaj avatar Nov 01 '25 23:11 Talmaj