onnx_modelΒΆ

Module for formulating an ONNX MLP model into a Model.

Supported ONNX models are simple feed-forward networks composed of Gemm nodes (dense layers) or MatMul`+`Add sequences, along with Relu activations. This mirrors the Keras and PyTorch integrations, which currently handle Dense/Linear + ReLU networks.

Functions

add_onnx_constr(gp_model, onnx_model, input_vars)

Formulate an ONNX MLP model into gp_model.

Classes

ONNXNetworkConstr(gp_model, predictor, ...)

Formulate a supported ONNX MLP model as a Gurobi predictor constraint.