diff --git a/README.md b/README.md index 672bef2..88ca366 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ ![L4CasADi CI](https://github.com/Tim-Salzmann/l4casadi/actions/workflows/ci.yaml/badge.svg) ![Downloads](https://img.shields.io/pypi/dm/l4casadi.svg) -**Due to a bug, Hessians for functions with non-scalar outputs were wrong prior to version 1.3.0* - --- # Learning 4 CasADi Framework @@ -28,9 +26,10 @@ Talk: [Youtube](https://youtu.be/UYdkRnGr8eM?si=KEPcFEL9b7Vk2juI&t=3348) ## Table of Content - [Projects using L4CasADi](#projects-using-l4casadi) - [Installation](#installation) +- [Quick Start](#quick-start) - [Online Learning](#online-learning-and-updating) -- [Naive L4CasADi](#naive-l4casadi) -- [Real-time L4CasADi](#real-time-l4casadi) +- [Naive L4CasADi](#naive-l4casadi) - Use this for small Multi Layer Perceptron Models. +- [Real-time L4CasADi](#real-time-l4casadi) - Use this for fast MPC with Acados. - [Examples](#examples) If you use this framework please cite the following two paper @@ -108,6 +107,19 @@ E.g. `CUDACXX= pip install l4casadi --no-build-isolation`. --- +## Quick Start + +Defining an L4CasADi model in Python given a pre-defined PyTorch model is as easy as +```python +import l4casadi as l4c + +l4c_model = l4c.L4CasADi(pyTorch_model, device='cpu') +``` + +where the architecture of the PyTorch model is unrestricted and large models can be accelerated with dedicated hardware. + +--- + ## Online Learning and Updating L4CasADi supports updating the PyTorch model online in the CasADi graph. To use this feature, pass `mutable=True` when initializing a L4CasADi. To update the model, call the `update` function on the `L4CasADi` object.