netrans/test/netrans_cli/run_complete_workflow.sh

52 lines
940 B
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# 完整的netrans工作流程load -> quantize -> quantize_hybrid -> add_pre_post -> export
echo "=== 完整的Netrans工作流程开始 ==="
echo
# 第一步:加载模型
echo "1. 加载模型..."
./01_load.sh
if [ $? -ne 0 ]; then
echo "工作流程中断"
exit 1
fi
echo
# 第二步:普通量化
echo "2. 普通量化..."
./02_quantize.sh
if [ $? -ne 0 ]; then
echo "工作流程中断"
exit 1
fi
echo
# 第三步:混合量化
echo "3. 混合量化..."
./03_quantize_hybrid.sh
if [ $? -ne 0 ]; then
echo "工作流程中断"
exit 1
fi
echo
# 第四步:添加前后处理
echo "4. 添加前后处理..."
./04_add_pre_post.sh
if [ $? -ne 0 ]; then
echo "工作流程中断"
exit 1
fi
echo
# 第五步:导出模型
echo "5. 导出模型..."
./05_export.sh
if [ $? -ne 0 ]; then
echo "工作流程中断"
exit 1
fi
echo
echo "=== 完整的Netrans工作流程完成 ==="