Skip to content

Commit eb268c4

Browse files
TheStoneMXwilliamFalcon
authored andcommitted
Added missing parameters (#237)
* Added missing parameters added missing distributed_backend parameter and added the parameter to step 4 Init Trainer. * Update single_gpu_node_dp_template.py
1 parent 6803018 commit eb268c4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/new_project_templates/single_gpu_node_dp_template.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def main(hparams):
7171
checkpoint_callback=checkpoint,
7272
early_stop_callback=early_stop,
7373
gpus=hparams.gpus,
74+
distributed_backend=hparams.dist_backend,
7475
)
7576

7677
# ------------------------
@@ -94,6 +95,8 @@ def main(hparams):
9495
parent_parser.add_argument('--gpus', type=str, default='-1',
9596
help='how many gpus to use in the node.'
9697
' value -1 uses all the gpus on the node')
98+
parent_parser.add_argument('--dist_backend', type=str, default='dp',
99+
help='When using multiple GPUs set Trainer(distributed_backend=dp) (or ddp)')
97100
parent_parser.add_argument('--test_tube_save_path', type=str, default=test_tube_dir,
98101
help='where to save logs')
99102
parent_parser.add_argument('--model_save_path', type=str, default=checkpoint_dir,

0 commit comments

Comments
 (0)