Skip to content

Commit

Permalink
remove with_data_parallel in static graph training (#5438)
Browse files Browse the repository at this point in the history
* remove with_data_parallel in static graph training

* fix codestyle
  • Loading branch information
kangguangli authored Apr 3, 2023
1 parent 2560f2d commit 5931590
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions examples/machine_translation/transformer/static/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,7 @@ def do_train(args):
build_strategy = paddle.static.BuildStrategy()
exec_strategy = paddle.static.ExecutionStrategy()

compiled_train_program = paddle.static.CompiledProgram(train_program).with_data_parallel(
loss_name=avg_cost.name, build_strategy=build_strategy, exec_strategy=exec_strategy
)
compiled_train_program = paddle.static.CompiledProgram(train_program, build_strategy=build_strategy)
exe.run(startup_program)

if args.use_amp:
Expand Down

0 comments on commit 5931590

Please sign in to comment.