mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-11 12:31:23 +08:00
updated docs
This commit is contained in:
committed by
J. Borovec
parent
be89eb07c8
commit
0d5f7671e0
@@ -55,6 +55,21 @@ Now we can parametrize the LightningModule.
|
||||
.. note:: Bonus! if (hparams) is in your module, Lightning will save it into the checkpoint and restore your
|
||||
model using those hparams exactly.
|
||||
|
||||
And we can also add all the flags available in the Trainer to the Argparser.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# add all the available Trainer options to the ArgParser
|
||||
parser = pl.Trainer.add_argparse_args(parser)
|
||||
args = parser.parse_args()
|
||||
|
||||
And now you can start your program with
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# now you can use any trainer flag
|
||||
$ python main.py --num_nodes 2 --gpus 8
|
||||
|
||||
Trainer args
|
||||
^^^^^^^^^^^^
|
||||
|
||||
|
||||
Reference in New Issue
Block a user