build_trt_engine.sh
# configure the environment
. tool/environment.sh
if [ "$ConfigurationStatus" != "Success" ]; then
echo "Exit due to configure failure."
exit
fi
# tensorrt version
# version=`trtexec | grep -m 1 TensorRT | sed -n "s/.*\[TensorRT v\([0-9]*\)\].*/\1/p"`
# resnet50/resnet50-int8/swint-tiny
base=model/$DEBUG_MODEL
# fp16/int8
precision=$DEBUG_PRECISION
# precision flags
trtexec_fp16_flags="--fp16"
trtexec_dynamic_flags="--fp16"
if [ "$precision" == "int8" ]; then
trtexec_dynamic_flags="--fp16 --int8"
fi
function get_onnx_number_io(){
# $1=model
model=$1
if [ ! -f "$model" ]; then