The scripts should be run in the following order.
See the models
directory for some examples.
- If the input is a saved TensorFlow checkpoint or SavedModel, run
create_inference_graph.py
. You can skip this if you have the inference graph already. - To optimize an inference graph, run
optimize_inference_graph.py
- Run
dnn_to_spatial.py
and pass the inference graph as input - Follow the printed instructions to run the Spatial compiler for the generated application
- Once Spatial compilation finishes, follow the aws instructions to load the generated AFI to your EC2 F1 instance and run the inference
- Run
data/img_to_csv.py
on the input image - Pass the .csv file as an argument to the Spatial Top executable