mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-10 12:21:57 +08:00
updated docs
This commit is contained in:
@@ -83,6 +83,7 @@ extensions = [
|
||||
'sphinx.ext.autosummary',
|
||||
'sphinx.ext.napoleon',
|
||||
'recommonmark',
|
||||
'sphinx.ext.autosectionlabel',
|
||||
# 'm2r',
|
||||
'nbsphinx',
|
||||
]
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
Welcome to PyTorch-Lightning!
|
||||
PyTorch-Lightning Documentation
|
||||
=============================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 4
|
||||
:maxdepth: 1
|
||||
:name: start
|
||||
:caption: Quick Start
|
||||
:caption: Start Here
|
||||
|
||||
new-project
|
||||
examples
|
||||
@@ -17,7 +17,7 @@ Welcome to PyTorch-Lightning!
|
||||
.. toctree::
|
||||
:maxdepth: 4
|
||||
:name: docs
|
||||
:caption: Docs
|
||||
:caption: Python API
|
||||
|
||||
documentation
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
Quick Start
|
||||
===========
|
||||
To start a new project define two files, a LightningModule and a Trainer file.
|
||||
To illustrate Lightning power and simplicity, here's an example of a typical research flow.
|
||||
| To start a new project define two files, a LightningModule and a Trainer file.
|
||||
| To illustrate the power of Lightning and its simplicity, here's an example of a typical research flow.
|
||||
|
||||
Case 1: BERT
|
||||
------------
|
||||
|
||||
Let's say you're working on something like BERT but want to try different ways of training or even different networks.
|
||||
You would define a single LightningModule and use flags to switch between your different ideas.
|
||||
| Let's say you're working on something like BERT but want to try different ways of training or even different networks.
|
||||
| You would define a single LightningModule and use flags to switch between your different ideas.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
@@ -66,6 +66,10 @@ Then you could do rapid research by switching between these two and using the sa
|
||||
|
||||
**Notice a few things about this flow:**
|
||||
|
||||
1. You're writing pure PyTorch... no unnecessary abstractions or new libraries to learn.
|
||||
2. You get free GPU and 16-bit support without writing any of that code in your model.
|
||||
3. You also get all of the capabilities below (without coding or testing yourself).
|
||||
1. You're writing pure PyTorch... no unnecessary abstractions or new libraries to learn.
|
||||
2. You get free GPU and 16-bit support without writing any of that code in your model.
|
||||
3. You also get all of the capabilities below (without coding or testing yourself).
|
||||
|
||||
- :ref:`Examples & Tutorials`
|
||||
- :ref:`Examples & Tutorials`
|
||||
- :ref:`Examples & Tutorials`
|
||||
|
||||
@@ -16,4 +16,8 @@ This is the basic use of the trainer:
|
||||
trainer = Trainer()
|
||||
trainer.fit(model)
|
||||
|
||||
"""
|
||||
The Trainer holds all the engineering code you might need such as distributing over GPUs or early stopping.
|
||||
The LightningTemplate holds the core computations, train, val, test loop, optimizer and dataloaders.
|
||||
|
||||
This pattern de-couples the engineering from the science which makes your code reusable and free to run on any hardware.
|
||||
"""
|
||||
Reference in New Issue
Block a user