H-GTCRN.AXERA / run.sh
HY-2012's picture
H-GTCRN AX650 inference: axmodel + Python SDK + C++ executable (board-verified)
1ebfbbf verified
Raw
History Blame Contribute Delete
551 Bytes
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "$0")" && pwd)"
export LD_LIBRARY_PATH="/soc/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
export PYTHONPATH="$ROOT/python${PYTHONPATH:+:$PYTHONPATH}"
PYTHON_BIN="${PYTHON_BIN:-python3}"
if [[ -x /root/miniforge3/bin/python ]]; then
PYTHON_BIN=/root/miniforge3/bin/python
fi
"$PYTHON_BIN" "$ROOT/python/h_gtcrn_core_sdk/example.py" \
--model "$ROOT/models/model.axmodel" \
--input "$ROOT/examples/sample_input.npy" \
--output-dir "$ROOT/output" \
--bench 20 \
--audio-seconds 10.0