Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 630 Bytes

File metadata and controls

19 lines (14 loc) · 630 Bytes

minimal.py — Basic Inference Example

Demonstrates the simplest Python-API workflow to load an NNFW model, allocate inputs, run inference, and report success.

Purpose

  • Load an .nnpackage model
  • Automatically query input tensor shapes
  • Allocate zero-filled NumPy arrays for each input
  • Perform a single inference call via session.infer(...)
  • Print a confirmation message

Usage

python minimal.py /path/to/your_model.nnpackage [backends]
  • /path/to/your_model.nnpackage – path to your NNFW package or model file
  • backends (optional) – backend string (e.g. "cpu", "gpu"); defaults to "cpu"