The LEIP Run tool is provided to run a single inference against a model in a consistent way across several stages of the LEIP tool chain. It allows an inference in TensorFlow, TFLite, PyTorch and LRE runtimes.

You can use the leip run command to run inference on a single sample through the specified model. Please run leip run --help command to obtain the full list of supported options.

Classname Files

The classnames file is the list of strings describing the names of the output classes. The first one in the file is 0, the next is 1 etc.

The classnames files are specified as follows:

  • A text file, typically ending in .txt but not required to do so, containing a list of human readable class names.

  • The name corresponds to the line number it appears on the file, zero-indexed.

CLI Usage

The basic command is:

# Use the run command to run a single inference test
leip run --input_path workspace/models/inceptionv3/keras-open-images-10-classes/ \
         --test_path workspace/datasets/open-images-10-classes/eval/Apple/0ef341dfb802eff1.jpg \
         --class_names workspace/datasets/open-images-10-classes/eval/class_names.txt

For a detailed explanation of each option see the CLI Reference for LEIP Run.