Skip to content

Commit 5931590

Browse files
authored
remove with_data_parallel in static graph training (#5438)
* remove with_data_parallel in static graph training * fix codestyle
1 parent 2560f2d commit 5931590

File tree

1 file changed

+1
-3
lines changed
  • examples/machine_translation/transformer/static

1 file changed

+1
-3
lines changed

examples/machine_translation/transformer/static/train.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,7 @@ def do_train(args):
228228
build_strategy = paddle.static.BuildStrategy()
229229
exec_strategy = paddle.static.ExecutionStrategy()
230230

231-
compiled_train_program = paddle.static.CompiledProgram(train_program).with_data_parallel(
232-
loss_name=avg_cost.name, build_strategy=build_strategy, exec_strategy=exec_strategy
233-
)
231+
compiled_train_program = paddle.static.CompiledProgram(train_program, build_strategy=build_strategy)
234232
exe.run(startup_program)
235233

236234
if args.use_amp:

0 commit comments

Comments
 (0)