Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
models
提交
6bf268f9
M
models
项目概览
PaddlePaddle
/
models
大约 1 年 前同步成功
通知
222
Star
6828
Fork
2962
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
602
列表
看板
标记
里程碑
合并请求
255
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
models
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
602
Issue
602
列表
看板
标记
里程碑
合并请求
255
合并请求
255
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
6bf268f9
编写于
10月 08, 2019
作者:
S
sneaxiy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove mem opt strategies settings, test=develop
上级
6aaf0192
变更
22
隐藏空白更改
内联
并排
Showing
22 changed file
with
0 addition
and
48 deletion
+0
-48
PaddleCV/PaddleGAN/trainer/CGAN.py
PaddleCV/PaddleGAN/trainer/CGAN.py
+0
-2
PaddleCV/PaddleGAN/trainer/CycleGAN.py
PaddleCV/PaddleGAN/trainer/CycleGAN.py
+0
-2
PaddleCV/PaddleGAN/trainer/DCGAN.py
PaddleCV/PaddleGAN/trainer/DCGAN.py
+0
-2
PaddleCV/PaddleGAN/trainer/SPADE.py
PaddleCV/PaddleGAN/trainer/SPADE.py
+0
-2
PaddleCV/PaddleVideo/train.py
PaddleCV/PaddleVideo/train.py
+0
-1
PaddleCV/deeplabv3+/train.py
PaddleCV/deeplabv3+/train.py
+0
-1
PaddleCV/image_classification/legacy/dist_train/dist_train.py
...leCV/image_classification/legacy/dist_train/dist_train.py
+0
-1
PaddleCV/image_classification/utils/utility.py
PaddleCV/image_classification/utils/utility.py
+0
-2
PaddleCV/rcnn/train.py
PaddleCV/rcnn/train.py
+0
-2
PaddleCV/ssd/train.py
PaddleCV/ssd/train.py
+0
-1
PaddleCV/yolov3/train.py
PaddleCV/yolov3/train.py
+0
-1
PaddleNLP/Research/ACL2019-KTNET/reading_comprehension/src/run_record.py
...rch/ACL2019-KTNET/reading_comprehension/src/run_record.py
+0
-5
PaddleNLP/Research/ACL2019-KTNET/reading_comprehension/src/run_record_twomemory.py
...9-KTNET/reading_comprehension/src/run_record_twomemory.py
+0
-5
PaddleNLP/Research/ACL2019-KTNET/reading_comprehension/src/run_squad.py
...arch/ACL2019-KTNET/reading_comprehension/src/run_squad.py
+0
-5
PaddleNLP/Research/ACL2019-KTNET/reading_comprehension/src/run_squad_twomemory.py
...19-KTNET/reading_comprehension/src/run_squad_twomemory.py
+0
-5
PaddleNLP/dialogue_model_toolkit/auto_dialogue_evaluation/train.py
.../dialogue_model_toolkit/auto_dialogue_evaluation/train.py
+0
-1
PaddleNLP/dialogue_model_toolkit/dialogue_general_understanding/train.py
...gue_model_toolkit/dialogue_general_understanding/train.py
+0
-2
PaddleNLP/language_model/train.py
PaddleNLP/language_model/train.py
+0
-2
PaddleNLP/lexical_analysis/train.py
PaddleNLP/lexical_analysis/train.py
+0
-2
PaddleNLP/neural_machine_translation/transformer/train.py
PaddleNLP/neural_machine_translation/transformer/train.py
+0
-1
PaddleNLP/unarchived/neural_machine_translation/rnn_search/train.py
...unarchived/neural_machine_translation/rnn_search/train.py
+0
-2
PaddleSlim/quant_low_level_api/quant.py
PaddleSlim/quant_low_level_api/quant.py
+0
-1
未找到文件。
PaddleCV/PaddleGAN/trainer/CGAN.py
浏览文件 @
6bf268f9
...
@@ -111,9 +111,7 @@ class CGAN(object):
...
@@ -111,9 +111,7 @@ class CGAN(object):
utility
.
init_checkpoints
(
self
.
cfg
,
exe
,
g_trainer
,
"net_G"
)
utility
.
init_checkpoints
(
self
.
cfg
,
exe
,
g_trainer
,
"net_G"
)
utility
.
init_checkpoints
(
self
.
cfg
,
exe
,
d_trainer
,
"net_D"
)
utility
.
init_checkpoints
(
self
.
cfg
,
exe
,
d_trainer
,
"net_D"
)
### memory optim
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
.
enable_inplace
=
True
g_trainer_program
=
fluid
.
CompiledProgram
(
g_trainer_program
=
fluid
.
CompiledProgram
(
g_trainer
.
program
).
with_data_parallel
(
g_trainer
.
program
).
with_data_parallel
(
...
...
PaddleCV/PaddleGAN/trainer/CycleGAN.py
浏览文件 @
6bf268f9
...
@@ -279,9 +279,7 @@ class CycleGAN(object):
...
@@ -279,9 +279,7 @@ class CycleGAN(object):
utility
.
init_checkpoints
(
self
.
cfg
,
exe
,
d_A_trainer
,
"net_DA"
)
utility
.
init_checkpoints
(
self
.
cfg
,
exe
,
d_A_trainer
,
"net_DA"
)
utility
.
init_checkpoints
(
self
.
cfg
,
exe
,
d_B_trainer
,
"net_DB"
)
utility
.
init_checkpoints
(
self
.
cfg
,
exe
,
d_B_trainer
,
"net_DB"
)
### memory optim
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
.
enable_inplace
=
True
gen_trainer_program
=
fluid
.
CompiledProgram
(
gen_trainer_program
=
fluid
.
CompiledProgram
(
gen_trainer
.
program
).
with_data_parallel
(
gen_trainer
.
program
).
with_data_parallel
(
...
...
PaddleCV/PaddleGAN/trainer/DCGAN.py
浏览文件 @
6bf268f9
...
@@ -107,9 +107,7 @@ class DCGAN(object):
...
@@ -107,9 +107,7 @@ class DCGAN(object):
utility
.
init_checkpoints
(
self
.
cfg
,
exe
,
g_trainer
,
"net_G"
)
utility
.
init_checkpoints
(
self
.
cfg
,
exe
,
g_trainer
,
"net_G"
)
utility
.
init_checkpoints
(
self
.
cfg
,
exe
,
d_trainer
,
"net_D"
)
utility
.
init_checkpoints
(
self
.
cfg
,
exe
,
d_trainer
,
"net_D"
)
### memory optim
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
.
enable_inplace
=
True
g_trainer_program
=
fluid
.
CompiledProgram
(
g_trainer_program
=
fluid
.
CompiledProgram
(
g_trainer
.
program
).
with_data_parallel
(
g_trainer
.
program
).
with_data_parallel
(
...
...
PaddleCV/PaddleGAN/trainer/SPADE.py
浏览文件 @
6bf268f9
...
@@ -323,9 +323,7 @@ class SPADE(object):
...
@@ -323,9 +323,7 @@ class SPADE(object):
utility
.
init_checkpoints
(
self
.
cfg
,
exe
,
gen_trainer
,
"net_G"
)
utility
.
init_checkpoints
(
self
.
cfg
,
exe
,
gen_trainer
,
"net_G"
)
utility
.
init_checkpoints
(
self
.
cfg
,
exe
,
dis_trainer
,
"net_D"
)
utility
.
init_checkpoints
(
self
.
cfg
,
exe
,
dis_trainer
,
"net_D"
)
### memory optim
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
.
enable_inplace
=
False
build_strategy
.
sync_batch_norm
=
False
build_strategy
.
sync_batch_norm
=
False
gen_trainer_program
=
fluid
.
CompiledProgram
(
gen_trainer_program
=
fluid
.
CompiledProgram
(
...
...
PaddleCV/PaddleVideo/train.py
浏览文件 @
6bf268f9
...
@@ -168,7 +168,6 @@ def train(args):
...
@@ -168,7 +168,6 @@ def train(args):
train_model
.
load_pretrain_params
(
exe
,
pretrain
,
train_prog
,
place
)
train_model
.
load_pretrain_params
(
exe
,
pretrain
,
train_prog
,
place
)
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
.
enable_inplace
=
True
if
args
.
model_name
in
[
'CTCN'
]:
if
args
.
model_name
in
[
'CTCN'
]:
build_strategy
.
enable_sequential_execution
=
True
build_strategy
.
enable_sequential_execution
=
True
...
...
PaddleCV/deeplabv3+/train.py
浏览文件 @
6bf268f9
...
@@ -199,7 +199,6 @@ exec_strategy.num_iteration_per_drop_scope = 100
...
@@ -199,7 +199,6 @@ exec_strategy.num_iteration_per_drop_scope = 100
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
=
fluid
.
BuildStrategy
()
if
args
.
memory_optimize
:
if
args
.
memory_optimize
:
build_strategy
.
fuse_relu_depthwise_conv
=
True
build_strategy
.
fuse_relu_depthwise_conv
=
True
build_strategy
.
enable_inplace
=
True
place
=
fluid
.
CPUPlace
()
place
=
fluid
.
CPUPlace
()
if
args
.
use_gpu
:
if
args
.
use_gpu
:
...
...
PaddleCV/image_classification/legacy/dist_train/dist_train.py
浏览文件 @
6bf268f9
...
@@ -284,7 +284,6 @@ def train_parallel(args):
...
@@ -284,7 +284,6 @@ def train_parallel(args):
strategy
.
num_iteration_per_drop_scope
=
30
strategy
.
num_iteration_per_drop_scope
=
30
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
.
memory_optimize
=
False
build_strategy
.
enable_sequential_execution
=
bool
(
build_strategy
.
enable_sequential_execution
=
bool
(
args
.
enable_sequential_execution
)
args
.
enable_sequential_execution
)
...
...
PaddleCV/image_classification/utils/utility.py
浏览文件 @
6bf268f9
...
@@ -384,8 +384,6 @@ def best_strategy_compiled(args, program, loss):
...
@@ -384,8 +384,6 @@ def best_strategy_compiled(args, program, loss):
return
program
return
program
else
:
else
:
build_strategy
=
fluid
.
compiler
.
BuildStrategy
()
build_strategy
=
fluid
.
compiler
.
BuildStrategy
()
#Feature will be supported in Fluid v1.6
#build_strategy.enable_inplace = True
exec_strategy
=
fluid
.
ExecutionStrategy
()
exec_strategy
=
fluid
.
ExecutionStrategy
()
exec_strategy
.
num_threads
=
fluid
.
core
.
get_cuda_device_count
()
exec_strategy
.
num_threads
=
fluid
.
core
.
get_cuda_device_count
()
...
...
PaddleCV/rcnn/train.py
浏览文件 @
6bf268f9
...
@@ -119,8 +119,6 @@ def train():
...
@@ -119,8 +119,6 @@ def train():
if
cfg
.
parallel
:
if
cfg
.
parallel
:
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
.
memory_optimize
=
False
build_strategy
.
enable_inplace
=
True
exec_strategy
=
fluid
.
ExecutionStrategy
()
exec_strategy
=
fluid
.
ExecutionStrategy
()
exec_strategy
.
num_iteration_per_drop_scope
=
10
exec_strategy
.
num_iteration_per_drop_scope
=
10
...
...
PaddleCV/ssd/train.py
浏览文件 @
6bf268f9
...
@@ -209,7 +209,6 @@ def train(args,
...
@@ -209,7 +209,6 @@ def train(args,
if
parallel
:
if
parallel
:
loss
.
persistable
=
True
loss
.
persistable
=
True
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
.
enable_inplace
=
True
train_exe
=
fluid
.
ParallelExecutor
(
main_program
=
train_prog
,
train_exe
=
fluid
.
ParallelExecutor
(
main_program
=
train_prog
,
use_cuda
=
use_gpu
,
loss_name
=
loss
.
name
,
build_strategy
=
build_strategy
)
use_cuda
=
use_gpu
,
loss_name
=
loss
.
name
,
build_strategy
=
build_strategy
)
...
...
PaddleCV/yolov3/train.py
浏览文件 @
6bf268f9
...
@@ -111,7 +111,6 @@ def train():
...
@@ -111,7 +111,6 @@ def train():
fluid
.
io
.
load_vars
(
exe
,
cfg
.
pretrain
,
predicate
=
if_exist
)
fluid
.
io
.
load_vars
(
exe
,
cfg
.
pretrain
,
predicate
=
if_exist
)
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
.
memory_optimize
=
False
#gc and memory optimize may conflict
syncbn
=
cfg
.
syncbn
syncbn
=
cfg
.
syncbn
if
(
syncbn
and
devices_num
<=
1
)
or
num_trainers
>
1
:
if
(
syncbn
and
devices_num
<=
1
)
or
num_trainers
>
1
:
print
(
"Disable syncbn in single device"
)
print
(
"Disable syncbn in single device"
)
...
...
PaddleNLP/Research/ACL2019-KTNET/reading_comprehension/src/run_record.py
浏览文件 @
6bf268f9
...
@@ -398,8 +398,6 @@ def train(args):
...
@@ -398,8 +398,6 @@ def train(args):
ema
=
fluid
.
optimizer
.
ExponentialMovingAverage
(
args
.
ema_decay
)
ema
=
fluid
.
optimizer
.
ExponentialMovingAverage
(
args
.
ema_decay
)
ema
.
update
()
ema
.
update
()
fluid
.
memory_optimize
(
train_program
,
skip_opt_set
=
[
loss
.
name
,
num_seqs
.
name
])
if
args
.
verbose
:
if
args
.
verbose
:
if
args
.
in_tokens
:
if
args
.
in_tokens
:
lower_mem
,
upper_mem
,
unit
=
fluid
.
contrib
.
memory_usage
(
lower_mem
,
upper_mem
,
unit
=
fluid
.
contrib
.
memory_usage
(
...
@@ -444,9 +442,6 @@ def train(args):
...
@@ -444,9 +442,6 @@ def train(args):
if
args
.
use_ema
and
'ema'
not
in
dir
():
if
args
.
use_ema
and
'ema'
not
in
dir
():
ema
=
fluid
.
optimizer
.
ExponentialMovingAverage
(
args
.
ema_decay
)
ema
=
fluid
.
optimizer
.
ExponentialMovingAverage
(
args
.
ema_decay
)
fluid
.
memory_optimize
(
test_prog
,
skip_opt_set
=
[
unique_ids
.
name
,
start_logits
.
name
,
end_logits
.
name
,
num_seqs
.
name
])
test_prog
=
test_prog
.
clone
(
for_test
=
True
)
test_prog
=
test_prog
.
clone
(
for_test
=
True
)
# if args.random_seed is not None:
# if args.random_seed is not None:
# test_prog.random_seed = args.random_seed
# test_prog.random_seed = args.random_seed
...
...
PaddleNLP/Research/ACL2019-KTNET/reading_comprehension/src/run_record_twomemory.py
浏览文件 @
6bf268f9
...
@@ -426,8 +426,6 @@ def train(args):
...
@@ -426,8 +426,6 @@ def train(args):
ema
=
fluid
.
optimizer
.
ExponentialMovingAverage
(
args
.
ema_decay
)
ema
=
fluid
.
optimizer
.
ExponentialMovingAverage
(
args
.
ema_decay
)
ema
.
update
()
ema
.
update
()
fluid
.
memory_optimize
(
train_program
,
skip_opt_set
=
[
loss
.
name
,
num_seqs
.
name
])
if
args
.
verbose
:
if
args
.
verbose
:
if
args
.
in_tokens
:
if
args
.
in_tokens
:
lower_mem
,
upper_mem
,
unit
=
fluid
.
contrib
.
memory_usage
(
lower_mem
,
upper_mem
,
unit
=
fluid
.
contrib
.
memory_usage
(
...
@@ -475,9 +473,6 @@ def train(args):
...
@@ -475,9 +473,6 @@ def train(args):
if
args
.
use_ema
and
'ema'
not
in
dir
():
if
args
.
use_ema
and
'ema'
not
in
dir
():
ema
=
fluid
.
optimizer
.
ExponentialMovingAverage
(
args
.
ema_decay
)
ema
=
fluid
.
optimizer
.
ExponentialMovingAverage
(
args
.
ema_decay
)
fluid
.
memory_optimize
(
test_prog
,
skip_opt_set
=
[
unique_ids
.
name
,
start_logits
.
name
,
end_logits
.
name
,
num_seqs
.
name
])
test_prog
=
test_prog
.
clone
(
for_test
=
True
)
test_prog
=
test_prog
.
clone
(
for_test
=
True
)
# if args.random_seed is not None:
# if args.random_seed is not None:
# test_prog.random_seed = args.random_seed
# test_prog.random_seed = args.random_seed
...
...
PaddleNLP/Research/ACL2019-KTNET/reading_comprehension/src/run_squad.py
浏览文件 @
6bf268f9
...
@@ -398,8 +398,6 @@ def train(args):
...
@@ -398,8 +398,6 @@ def train(args):
ema
=
fluid
.
optimizer
.
ExponentialMovingAverage
(
args
.
ema_decay
)
ema
=
fluid
.
optimizer
.
ExponentialMovingAverage
(
args
.
ema_decay
)
ema
.
update
()
ema
.
update
()
fluid
.
memory_optimize
(
train_program
,
skip_opt_set
=
[
loss
.
name
,
num_seqs
.
name
])
if
args
.
verbose
:
if
args
.
verbose
:
if
args
.
in_tokens
:
if
args
.
in_tokens
:
lower_mem
,
upper_mem
,
unit
=
fluid
.
contrib
.
memory_usage
(
lower_mem
,
upper_mem
,
unit
=
fluid
.
contrib
.
memory_usage
(
...
@@ -444,9 +442,6 @@ def train(args):
...
@@ -444,9 +442,6 @@ def train(args):
if
args
.
use_ema
and
'ema'
not
in
dir
():
if
args
.
use_ema
and
'ema'
not
in
dir
():
ema
=
fluid
.
optimizer
.
ExponentialMovingAverage
(
args
.
ema_decay
)
ema
=
fluid
.
optimizer
.
ExponentialMovingAverage
(
args
.
ema_decay
)
fluid
.
memory_optimize
(
test_prog
,
skip_opt_set
=
[
unique_ids
.
name
,
start_logits
.
name
,
end_logits
.
name
,
num_seqs
.
name
])
test_prog
=
test_prog
.
clone
(
for_test
=
True
)
test_prog
=
test_prog
.
clone
(
for_test
=
True
)
# if args.random_seed is not None:
# if args.random_seed is not None:
# test_prog.random_seed = args.random_seed
# test_prog.random_seed = args.random_seed
...
...
PaddleNLP/Research/ACL2019-KTNET/reading_comprehension/src/run_squad_twomemory.py
浏览文件 @
6bf268f9
...
@@ -426,8 +426,6 @@ def train(args):
...
@@ -426,8 +426,6 @@ def train(args):
ema
=
fluid
.
optimizer
.
ExponentialMovingAverage
(
args
.
ema_decay
)
ema
=
fluid
.
optimizer
.
ExponentialMovingAverage
(
args
.
ema_decay
)
ema
.
update
()
ema
.
update
()
fluid
.
memory_optimize
(
train_program
,
skip_opt_set
=
[
loss
.
name
,
num_seqs
.
name
])
if
args
.
verbose
:
if
args
.
verbose
:
if
args
.
in_tokens
:
if
args
.
in_tokens
:
lower_mem
,
upper_mem
,
unit
=
fluid
.
contrib
.
memory_usage
(
lower_mem
,
upper_mem
,
unit
=
fluid
.
contrib
.
memory_usage
(
...
@@ -475,9 +473,6 @@ def train(args):
...
@@ -475,9 +473,6 @@ def train(args):
if
args
.
use_ema
and
'ema'
not
in
dir
():
if
args
.
use_ema
and
'ema'
not
in
dir
():
ema
=
fluid
.
optimizer
.
ExponentialMovingAverage
(
args
.
ema_decay
)
ema
=
fluid
.
optimizer
.
ExponentialMovingAverage
(
args
.
ema_decay
)
fluid
.
memory_optimize
(
test_prog
,
skip_opt_set
=
[
unique_ids
.
name
,
start_logits
.
name
,
end_logits
.
name
,
num_seqs
.
name
])
test_prog
=
test_prog
.
clone
(
for_test
=
True
)
test_prog
=
test_prog
.
clone
(
for_test
=
True
)
# if args.random_seed is not None:
# if args.random_seed is not None:
# test_prog.random_seed = args.random_seed
# test_prog.random_seed = args.random_seed
...
...
PaddleNLP/dialogue_model_toolkit/auto_dialogue_evaluation/train.py
浏览文件 @
6bf268f9
...
@@ -122,7 +122,6 @@ def do_train(args):
...
@@ -122,7 +122,6 @@ def do_train(args):
print
(
"finish init word embedding ..."
)
print
(
"finish init word embedding ..."
)
build_strategy
=
fluid
.
compiler
.
BuildStrategy
()
build_strategy
=
fluid
.
compiler
.
BuildStrategy
()
build_strategy
.
enable_inplace
=
True
compiled_train_prog
=
fluid
.
CompiledProgram
(
train_prog
).
with_data_parallel
(
compiled_train_prog
=
fluid
.
CompiledProgram
(
train_prog
).
with_data_parallel
(
loss_name
=
loss
.
name
,
build_strategy
=
build_strategy
)
loss_name
=
loss
.
name
,
build_strategy
=
build_strategy
)
...
...
PaddleNLP/dialogue_model_toolkit/dialogue_general_understanding/train.py
浏览文件 @
6bf268f9
...
@@ -165,8 +165,6 @@ def do_train(args):
...
@@ -165,8 +165,6 @@ def do_train(args):
save_load_io
.
init_from_pretrain_model
(
args
,
exe
,
train_prog
)
save_load_io
.
init_from_pretrain_model
(
args
,
exe
,
train_prog
)
build_strategy
=
fluid
.
compiler
.
BuildStrategy
()
build_strategy
=
fluid
.
compiler
.
BuildStrategy
()
build_strategy
.
enable_inplace
=
True
compiled_train_prog
=
fluid
.
CompiledProgram
(
train_prog
).
with_data_parallel
(
compiled_train_prog
=
fluid
.
CompiledProgram
(
train_prog
).
with_data_parallel
(
loss_name
=
loss
.
name
,
build_strategy
=
build_strategy
)
loss_name
=
loss
.
name
,
build_strategy
=
build_strategy
)
...
...
PaddleNLP/language_model/train.py
浏览文件 @
6bf268f9
...
@@ -176,8 +176,6 @@ def main():
...
@@ -176,8 +176,6 @@ def main():
exec_strategy
.
num_iteration_per_drop_scope
=
100
exec_strategy
.
num_iteration_per_drop_scope
=
100
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
.
enable_inplace
=
True
build_strategy
.
memory_optimize
=
False
build_strategy
.
fuse_all_optimizer_ops
=
True
build_strategy
.
fuse_all_optimizer_ops
=
True
if
args
.
parallel
:
if
args
.
parallel
:
...
...
PaddleNLP/lexical_analysis/train.py
浏览文件 @
6bf268f9
...
@@ -88,8 +88,6 @@ def do_train(args):
...
@@ -88,8 +88,6 @@ def do_train(args):
exec_strategy
=
fluid
.
ExecutionStrategy
()
exec_strategy
=
fluid
.
ExecutionStrategy
()
# exec_strategy.num_threads = dev_count * 6
# exec_strategy.num_threads = dev_count * 6
build_strategy
=
fluid
.
compiler
.
BuildStrategy
()
build_strategy
=
fluid
.
compiler
.
BuildStrategy
()
# build_strategy.enable_inplace = True
compiled_prog
=
fluid
.
compiler
.
CompiledProgram
(
train_program
).
with_data_parallel
(
compiled_prog
=
fluid
.
compiler
.
CompiledProgram
(
train_program
).
with_data_parallel
(
loss_name
=
train_ret
[
'avg_cost'
].
name
,
loss_name
=
train_ret
[
'avg_cost'
].
name
,
build_strategy
=
build_strategy
,
build_strategy
=
build_strategy
,
...
...
PaddleNLP/neural_machine_translation/transformer/train.py
浏览文件 @
6bf268f9
...
@@ -233,7 +233,6 @@ def do_train(args):
...
@@ -233,7 +233,6 @@ def do_train(args):
init_from_pretrain_model
(
args
,
exe
,
train_prog
)
init_from_pretrain_model
(
args
,
exe
,
train_prog
)
build_strategy
=
fluid
.
compiler
.
BuildStrategy
()
build_strategy
=
fluid
.
compiler
.
BuildStrategy
()
build_strategy
.
enable_inplace
=
True
exec_strategy
=
fluid
.
ExecutionStrategy
()
exec_strategy
=
fluid
.
ExecutionStrategy
()
if
num_trainers
>
1
:
if
num_trainers
>
1
:
dist_utils
.
prepare_for_multi_process
(
exe
,
build_strategy
,
train_prog
)
dist_utils
.
prepare_for_multi_process
(
exe
,
build_strategy
,
train_prog
)
...
...
PaddleNLP/unarchived/neural_machine_translation/rnn_search/train.py
浏览文件 @
6bf268f9
...
@@ -126,8 +126,6 @@ def main():
...
@@ -126,8 +126,6 @@ def main():
exec_strategy
.
num_iteration_per_drop_scope
=
100
exec_strategy
.
num_iteration_per_drop_scope
=
100
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
.
enable_inplace
=
True
build_strategy
.
memory_optimize
=
False
# build_strategy.fuse_all_optimizer_ops = True
# build_strategy.fuse_all_optimizer_ops = True
if
args
.
parallel
:
if
args
.
parallel
:
...
...
PaddleSlim/quant_low_level_api/quant.py
浏览文件 @
6bf268f9
...
@@ -255,7 +255,6 @@ def train(args):
...
@@ -255,7 +255,6 @@ def train(args):
load_persistable_nodes
(
exe
,
checkpoint
,
main_graph
)
load_persistable_nodes
(
exe
,
checkpoint
,
main_graph
)
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
.
memory_optimize
=
False
build_strategy
.
enable_inplace
=
False
build_strategy
.
enable_inplace
=
False
binary
=
fluid
.
CompiledProgram
(
main_graph
.
graph
).
with_data_parallel
(
binary
=
fluid
.
CompiledProgram
(
main_graph
.
graph
).
with_data_parallel
(
loss_name
=
train_cost
.
name
,
build_strategy
=
build_strategy
)
loss_name
=
train_cost
.
name
,
build_strategy
=
build_strategy
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录