Skip to content

Latest commit

 

History

History

keras-tract-tf2

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

A simple example of training a Tensorflow model with Python, check the model with tract python API, then loading it into tract and compare predictions.

Python side training

Setup environment.

pip install -r requirements.txt

Train a model, export it to ONNX along with a input and output example.

python example.py

(Outputs are commited to git, you don't need to run the python step at all.)

Rust side inference

Run the model and double check the output.

cargo run