Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleClas
提交
5ad28174
P
PaddleClas
项目概览
PaddlePaddle
/
PaddleClas
大约 1 年 前同步成功
通知
115
Star
4999
Fork
1114
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
19
列表
看板
标记
里程碑
合并请求
6
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleClas
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
19
Issue
19
列表
看板
标记
里程碑
合并请求
6
合并请求
6
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
5ad28174
编写于
11月 11, 2022
作者:
X
xiongkun
提交者:
Wei Shengyu
11月 14, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add statuscheck and follow the tipc_standard
上级
c9f8b87e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
16 addition
and
17 deletion
+16
-17
test_tipc/test_train_dy2static_python.sh
test_tipc/test_train_dy2static_python.sh
+16
-17
未找到文件。
test_tipc/test_train_dy2static_python.sh
浏览文件 @
5ad28174
...
...
@@ -20,16 +20,19 @@ model_name=$(func_parser_value "${lines[1]}")
LOG_PATH
=
"./test_tipc/output/
${
model_name
}
/
${
MODE
}
"
rm
-rf
$LOG_PATH
mkdir
-p
${
LOG_PATH
}
status_log
=
"
${
LOG_PATH
}
/results_python.log"
# start dygraph train
dygraph_output
=
$LOG_PATH
/dygraph_output.txt
dygraph_output
=
$LOG_PATH
/python_train_infer_dygraph_output.txt
dygraph_loss
=
$LOG_PATH
/dygraph_loss.txt
sed
-i
'15ctrainer:norm_train'
${
FILENAME
}
cmd
=
"bash test_tipc/test_train_inference_python.sh
${
FILENAME
}
$MODE
>
$dygraph_output
2>&1"
echo
$cmd
eval
$cmd
# start dy2static train
dy2static_output
=
$LOG_PATH
/dy2static_output.txt
dy2static_output
=
$LOG_PATH
/python_train_infer_dy2static_output.txt
dy2static_loss
=
$LOG_PATH
/dy2static_loss.txt
sed
-i
'15ctrainer:to_static_train'
${
FILENAME
}
cmd
=
"bash test_tipc/test_train_inference_python.sh
${
FILENAME
}
$MODE
>
$dy2static_output
2>&1"
echo
$cmd
...
...
@@ -37,21 +40,17 @@ eval $cmd
# analysis and compare the losses.
dyout
=
`
cat
$dy2static_output
| python3 test_tipc/extract_loss.py
-v
'Iter:'
-e
'loss: {%f},'
`
stout
=
`
cat
$dygraph_output
| python3 test_tipc/extract_loss.py
-v
'Iter:'
-e
'loss: {%f},'
`
echo
$dyout
echo
$stout
stout
=
`
cat
$dygraph_output
| python3 test_tipc/extract_loss.py
-v
'Iter:'
-e
'loss: {%f},'
`
echo
$dyout
>
$dygraph_loss
echo
$stout
>
$dy2static_loss
diff_log
=
$LOG_PATH
/diff_log.txt
diff_cmd
=
"diff -w
$dygraph_loss
$dy2static_loss
| tee
$diff_log
"
eval
$diff_cmd
last_status
=
$?
if
[
"
$dyout
"
=
""
]
;
then
echo
"Failed to run model."
exit
-1
status_check 2
$diff_cmd
$status_log
$model_name
$diff_log
fi
if
[
"
$dyout
"
=
"
$stout
"
]
;
then
echo
"Successful Run Dy2static."
exit
0
else
echo
"Loss is not equal."
echo
"Dygraph Loss is: "
echo
$dyout
echo
"Dy2Static Loss is: "
echo
$stout
exit
-1
if
[
"
$stout
"
=
""
]
;
then
status_check 2
$diff_cmd
$status_log
$model_name
$diff_log
fi
status_check
$last_status
$diff_cmd
$status_log
$model_name
$diff_log
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录