cog-imperial / OMLT

Represent trained machine learning models as Pyomo optimization formulations
Other
284 stars 59 forks source link

Error while reading onnx file #103

Closed hhijazi closed 1 year 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 1 year ago

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