We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I'm evaluating ONNX export feature.
I tried to export ResNet20 into ONNX file. save function worked well but onnx.checker.check_model raises following error.
save
onnx.checker.check_model
Traceback (most recent call last): File "cntk2onnx.py", line 19, in <module> onnx.checker.check_model(onnx_model) File "/usr/local/lib/python3.5/dist-packages/onnx/checker.py", line 32, in checker proto.SerializeToString(), ir_version) onnx.onnx_cpp2py_export.checker.ValidationError: Field 'type' of attr is required but missing. ==> Context: Bad node spec: output: "Parameter5454" name: "Parameter5454" op_type: "Constant" attribute { name: "value" t { dims: 1 dims: 10 data_type: FLOAT float_data: -0.070361428 float_data: -0.357194 float_data: 0.37219584 float_data: 0.47041565 float_data: 0.071708754 float_data: -0.092652842 float_data: -0.015438936 float_data: -0.084205344 float_data: -0.074094325 float_data: -0.22061794 } } doc_string: "" domain: ""
Here's my evaluation code.
import argparse import cntk as C import onnx parser = argparse.ArgumentParser(description='Convert CNTK model to ONNX') parser.add_argument('--input', '-i', required=True, type=str) parser.add_argument('--output', '-o', required=True, type=str) args = parser.parse_args() # obtain PyTorch model model = C.Function.load(args.input, device=C.device.cpu()) # export to ONNF print('converting to ONNX') model.save(args.output, format=C.ModelFormat.ONNX) print('checking converted model') onnx_model = onnx.load(args.output) onnx.checker.check_model(onnx_model)
It looks like CNTK's fault.
Thanks.
The text was updated successfully, but these errors were encountered:
Yes, this is a known issue. We will be fixing this soon. Stay tuned.
Sorry, something went wrong.
This has been fixed in CNTK 2.5. Please give it a try again and report any issues.
spandantiwari
No branches or pull requests
Hi, I'm evaluating ONNX export feature.
I tried to export ResNet20 into ONNX file.
save
function worked well butonnx.checker.check_model
raises following error.Here's my evaluation code.
It looks like CNTK's fault.
Thanks.
The text was updated successfully, but these errors were encountered: