# 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:

mnist_example_dense.ipynb trains a fully dense neural network on MNIST and uses OMLT to find adversarial examples.

mnist_example_convolutional.ipynb trains a convolutional neural network on MNIST and uses OMLT to find adversarial examples.

graph_neural_network_formulation.ipynb transforms graph neural networks into OMLT and builds formulation to solve optimization problems.

auto-thermal-reformer.ipynb develops a neural network surrogate (using sigmoid activations) with data from a process model built using IDAES-PSE.

auto-thermal-reformer-relu.ipynb develops a neural network surrogate (using ReLU activations) with data from a process model built using IDAES-PSE.