Jupyter Notebooks

OMLT provides Jupyter notebooks to demonstrate its core capabilities. All notebooks can be found on the OMLT github page.

The first set of notebooks demonstrates the basic mechanics of OMLT and shows how to use it:

  • build_network.ipynb shows how to manually create a NetworkDefinition object. This notebook is helpful for understanding the details of the internal layer structure that OMLT uses to represent neural networks.

  • import_network.ipynb shows how to import neural networks from Keras and PyTorch using ONNX interoperability. The notebook also shows how to import variable bounds from data.

  • neural_network_formulations.ipynb showcases the different neural network formulations available in OMLT.

  • index_handling.ipynb shows how to use IndexMapper to handle the mappings between indexes.

  • bo_with_trees.ipynb incorporates gradient-boosted trees into a Bayesian optimization loop to optimize the Rosenbrock function.

  • linear_tree_formulations.ipynb showcases the different linear model decision tree formulations available in OMLT.

The second set of notebooks gives application-specific examples: