cog-imperial / OMLT

Represent trained machine learning models as Pyomo optimization formulations
Other
257 stars 56 forks source link

Error while reading onnx file #103

Closed hhijazi closed 10 months ago

hhijazi commented 1 year ago

When I call the function net = load_onnx_neural_network(model) with the attached onnx file, I get the following error: File "/usr/local/lib/python3.10/site-packages/omlt/io/onnx_parser.py", line 235, in _consume_gemm_dense_nodes assert attr["transB"] == 1 AssertionError MatMul_Add_Sim.onnx.zip

jalving commented 1 year ago

Thanks for reporting this. We seem to be having a few issues with loading ONNX files. It is likely we will need to revisit the ONNX reader.

juan-campos commented 10 months ago

@hhijazi This bug has been fixed in PR #121 which we have now merged.