tutorials
tutorials copied to clipboard
check_model gives 'Bad node spec' error
Hi,
I'm trying to convert onnx to pb. The onnx file loading is done successfully. Then, I call prepare (a function of onnx_tf.beckend). This function calls onnx.checker.check_model -> that calls C.check_model(model.SerializeToString()).
I get these error lines:
Traceback (most recent call last):
File "C:/CP/DL_REPOSITORIES/pytorch-onnx-tensorflow-pb/convert_pytorch2onnx2tfpb.py", line 103, in
==> Context: Bad node spec: input: "708" output: "715" op_type: "Pad" attribute { name: "mode" s: "constant" type: STRING } attribute { name: "pads" ints: 0 ints: 0 ints: 0 ints: 0 ints: 0 ints: 0 ints: 0 ints: 0 type: INTS } attribute { name: "value" f: 0 type: FLOAT }
Can you please help?
I'm working with this onnx version version = '1.6.0' git_version = '553df22c67bee5f0fe6599cff60f1afc6748c635'
Pad operator was recently updated (https://github.com/onnx/onnx/blob/master/docs/Changelog.md#Pad-13) Per the new spec min of 2 inputs are required for this operator. In order to fix this issue you should update your Pad operator. Alternatively you can use an older opset for onnx