netrans/netrans_cli/config.sh

31 lines
461 B
Bash
Executable File

#!/bin/bash
if [ -z "$NETRANS_PATH" ]; then
echo "Need to set enviroment variable NETRANS_PATH"
exit 1
fi
if [ "$#" -ne 1 ]; then
echo "Enter a network name !"
exit 2
fi
if [ ! -e "${1%/}" ]; then
echo "Directory ${1%/} does not exist !"
exit 3
fi
netrans=$NETRANS_PATH/pnnacc
NAME=$(basename "$1")
pushd $1
echo $(pwd)
$netrans generate \
inputmeta \
--model ${NAME}.json \
--separated-database
popd