Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleGAN
提交
0927444b
P
PaddleGAN
项目概览
PaddlePaddle
/
PaddleGAN
1 年多 前同步成功
通知
97
Star
7254
Fork
1210
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
4
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleGAN
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
4
Issue
4
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
0927444b
编写于
3月 13, 2023
作者:
W
wangna11BD
提交者:
GitHub
3月 13, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix TIPC bug for cafe67538 (#765)
* fix TIPC bug for cafe67538 * fix style for TIPC
上级
fca1fe35
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
41 addition
and
20 deletion
+41
-20
test_tipc/benchmark_train.sh
test_tipc/benchmark_train.sh
+16
-9
test_tipc/configs/CycleGAN/train_infer_python.txt
test_tipc/configs/CycleGAN/train_infer_python.txt
+3
-1
test_tipc/configs/Pix2pix/train_infer_python.txt
test_tipc/configs/Pix2pix/train_infer_python.txt
+3
-1
test_tipc/configs/edvr/train_infer_python.txt
test_tipc/configs/edvr/train_infer_python.txt
+4
-2
test_tipc/configs/esrgan/train_infer_python.txt
test_tipc/configs/esrgan/train_infer_python.txt
+4
-2
test_tipc/configs/msvsr/train_infer_python.txt
test_tipc/configs/msvsr/train_infer_python.txt
+4
-2
test_tipc/test_train_inference_python.sh
test_tipc/test_train_inference_python.sh
+7
-3
未找到文件。
test_tipc/benchmark_train.sh
浏览文件 @
0927444b
...
...
@@ -67,6 +67,14 @@ FILENAME=$new_filename
# MODE must be one of ['benchmark_train']
MODE
=
$2
PARAMS
=
$3
REST_ARGS
=
$4
to_static
=
""
# parse "to_static" options and modify trainer into "to_static_trainer"
if
[[
$PARAMS
=
~
"dynamicTostatic"
]]
;
then
to_static
=
"d2sT_"
sed
-i
's/trainer:norm_train/trainer:to_static_train/g'
$FILENAME
fi
IFS
=
$'
\n
'
# parser params from train_benchmark.txt
...
...
@@ -77,7 +85,7 @@ lines=(${dataline})
model_name
=
$(
func_parser_value
"
${
lines
[1]
}
"
)
# 获取benchmark_params所在的行数
line_num
=
`
grep
-n
"train_benchmark_params"
$FILENAME
|
cut
-d
":"
-f
1
`
line_num
=
`
grep
-n
-w
"train_benchmark_params"
$FILENAME
|
cut
-d
":"
-f
1
`
# for train log parser
batch_size
=
$(
func_parser_value
"
${
lines
[line_num]
}
"
)
line_num
=
`
expr
$line_num
+ 1
`
...
...
@@ -128,6 +136,13 @@ if [ ! -n "$PARAMS" ] ;then
fp_items_list
=(
${
fp_items
}
)
device_num_list
=(
N1C4
)
run_mode
=
"DP"
elif
[[
${
PARAMS
}
=
"dynamicTostatic"
]]
;
then
IFS
=
"|"
model_type
=
$PARAMS
batch_size_list
=(
${
batch_size
}
)
fp_items_list
=(
${
fp_items
}
)
device_num_list
=(
N1C4
)
run_mode
=
"DP"
else
# parser params from input: modeltype_bs${bs_item}_${fp_item}_${run_mode}_${device_num}
IFS
=
"_"
...
...
@@ -149,14 +164,6 @@ else
device_num_list
=(
$device_num
)
fi
# for log name
to_static
=
""
# parse "to_static" options and modify trainer into "to_static_trainer"
if
[[
${
model_type
}
=
"dynamicTostatic"
]]
;
then
to_static
=
"d2sT_"
sed
-i
's/trainer:norm_train/trainer:to_static_train/g'
$FILENAME
fi
IFS
=
"|"
for
batch_size
in
${
batch_size_list
[*]
}
;
do
for
precision
in
${
fp_items_list
[*]
}
;
do
...
...
test_tipc/configs/CycleGAN/train_infer_python.txt
浏览文件 @
0927444b
...
...
@@ -17,7 +17,7 @@ norm_train:tools/main.py -c configs/cyclegan_horse2zebra.yaml --seed 123 -o log_
pact_train:null
fpgm_train:null
distill_train:null
to_static_train:model.to_static=True
null:null
null:null
##
===========================eval_params===========================
...
...
@@ -49,6 +49,8 @@ null:null
null:null
--benchmark:True
null:null
===========================to_static_train_benchmark_params===========================
to_static_train:model.to_static=True
===========================train_benchmark_params==========================
batch_size:1
fp_items:fp32
...
...
test_tipc/configs/Pix2pix/train_infer_python.txt
浏览文件 @
0927444b
...
...
@@ -17,7 +17,7 @@ norm_train:tools/main.py -c configs/pix2pix_facades.yaml --seed 123 -o log_confi
pact_train:null
fpgm_train:null
distill_train:null
to_static_train:model.to_static=True
null:null
null:null
##
===========================eval_params===========================
...
...
@@ -49,6 +49,8 @@ null:null
null:null
--benchmark:True
null:null
===========================to_static_train_benchmark_params===========================
to_static_train:model.to_static=True
===========================train_benchmark_params==========================
batch_size:1
fp_items:fp32
...
...
test_tipc/configs/edvr/train_infer_python.txt
浏览文件 @
0927444b
...
...
@@ -17,7 +17,7 @@ norm_train:tools/main.py -c configs/edvr_m_wo_tsa.yaml --seed 123 -o log_config.
pact_train:null
fpgm_train:null
distill_train:null
to_static_train:model.to_static=True
null:null
null:null
##
===========================eval_params===========================
...
...
@@ -49,9 +49,11 @@ null:null
null:null
--benchmark:True
null:null
===========================to_static_train_benchmark_params===========================
to_static_train:model.to_static=True
===========================train_benchmark_params==========================
batch_size:64
fp_items:fp32|fp16
total_iters:100
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:FLAGS_cudnn_exhaustive_search=
0
flags:FLAGS_cudnn_exhaustive_search=
1
test_tipc/configs/esrgan/train_infer_python.txt
浏览文件 @
0927444b
...
...
@@ -17,7 +17,7 @@ norm_train:tools/main.py -c configs/esrgan_psnr_x4_div2k.yaml --seed 123 -o log_
pact_train:null
fpgm_train:null
distill_train:null
to_static_train:model.to_static=True
null:null
null:null
##
===========================eval_params===========================
...
...
@@ -49,9 +49,11 @@ null:null
null:null
--benchmark:True
null:null
===========================to_static_train_benchmark_params===========================
to_static_train:model.to_static=True
===========================train_benchmark_params==========================
batch_size:32|64
fp_items:fp32
total_iters:500
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:FLAGS_cudnn_exhaustive_search=
0
flags:FLAGS_cudnn_exhaustive_search=
1
test_tipc/configs/msvsr/train_infer_python.txt
浏览文件 @
0927444b
...
...
@@ -17,7 +17,7 @@ norm_train:tools/main.py -c configs/msvsr_reds.yaml --seed 123 -o log_config.int
pact_train:null
fpgm_train:null
distill_train:null
to_static_train:model.to_static=True
null:null
null:null
##
===========================eval_params===========================
...
...
@@ -49,11 +49,13 @@ null:null
null:null
--benchmark:True
null:null
===========================to_static_train_benchmark_params===========================
to_static_train:model.to_static=True
===========================train_benchmark_params==========================
batch_size:2|4
fp_items:fp32|fp16
total_iters:60
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:FLAGS_cudnn_exhaustive_search=
0
flags:FLAGS_cudnn_exhaustive_search=
1
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[2,3,180,320]}]
test_tipc/test_train_inference_python.sh
浏览文件 @
0927444b
...
...
@@ -5,7 +5,7 @@ FILENAME=$1
# MODE be one of ['lite_train_lite_infer' 'lite_train_whole_infer' 'whole_train_whole_infer', 'whole_infer']
MODE
=
$2
dataline
=
$(
awk
'NR==1, NR==51{print}'
$FILENAME
)
dataline
=
$(
cat
${
FILENAME
}
)
# parser params
IFS
=
$'
\n
'
...
...
@@ -33,8 +33,8 @@ trainer_list=$(func_parser_value "${lines[14]}")
trainer_norm
=
$(
func_parser_key
"
${
lines
[15]
}
"
)
norm_trainer
=
$(
func_parser_value
"
${
lines
[15]
}
"
)
t
o_static_key
=
$(
func_parser_key
"
${
lines
[19]
}
"
)
t
o_static_trainer
=
$(
func_parser_value
"
${
lines
[19]
}
"
)
t
rainer_key1
=
$(
func_parser_key
"
${
lines
[19]
}
"
)
t
rainer_value1
=
$(
func_parser_value
"
${
lines
[19]
}
"
)
trainer_key2
=
$(
func_parser_key
"
${
lines
[20]
}
"
)
trainer_value2
=
$(
func_parser_value
"
${
lines
[20]
}
"
)
...
...
@@ -73,6 +73,10 @@ save_log_key=$(func_parser_key "${lines[48]}")
infer_key1
=
$(
func_parser_key
"
${
lines
[50]
}
"
)
infer_value1
=
$(
func_parser_value
"
${
lines
[50]
}
"
)
line_num
=
`
grep
-n
-w
"to_static_train_benchmark_params"
$FILENAME
|
cut
-d
":"
-f
1
`
to_static_key
=
$(
func_parser_key
"
${
lines
[line_num]
}
"
)
to_static_trainer
=
$(
func_parser_value
"
${
lines
[line_num]
}
"
)
LOG_PATH
=
"./test_tipc/output/
${
model_name
}
/
${
MODE
}
"
mkdir
-p
${
LOG_PATH
}
status_log
=
"
${
LOG_PATH
}
/results_python.log"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录