Windows-Machine-Learning icon indicating copy to clipboard operation
Windows-Machine-Learning copied to clipboard

I downgraded the ONNX model version to 9 to fit 19041, but it still doesn't work!

Open Lookforworld opened this issue 4 years ago • 1 comments

###@martinb35 My code:

       onnx.export(model,
            md_input,
            "out/eye.onnx",
            export_params=True,
            opset_version=9,
            verbose=False,
            do_constant_folding=True,
            input_names=['In'],
            output_names=['Out'],
            dynamic_axes={'In':{0:'batch_size'},
                          'Out':{0:'batch_size'}},
            # keep_initializers_as_inputs=True,
            )

I exported the PyTorch model with the above code and set the OP version to 9, but still got an error: Parameter error Failed to load model with error: Unknown model file format

I have tried all kinds of methods, but it still doesn't work. Is there any way to solve this problem? Thanks!

Environment

Windows Build Number:19041

OS Version (Server, IoT Core, Desktop, etc):windows 10

Visual Studio

  • [16 ] 2017 (version: )

Lookforworld avatar Aug 04 '21 07:08 Lookforworld

Hi @Lookforworld, do you mind sharing your model for reproduction purposes?

ryanlai2 avatar Jan 13 '22 06:01 ryanlai2

Closing due to inactivity.

nums11 avatar Aug 23 '22 22:08 nums11