Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions pytorch_lightning/core/lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,11 @@ def training_step(self, *args, **kwargs):
Any of.

- :class:`~torch.Tensor` - The loss tensor
- `dict` - A dictionary. Can include any keys, but must include the key 'loss'
- `None` - Training will skip to the next batch
- ``dict`` - A dictionary. Can include any keys, but must include the key ``'loss'``
- ``None`` - Training will skip to the next batch

Note:
Returning ``None`` is currently not supported for multi-GPU or TPU, or with 16-bit precision enabled.

In this step you'd normally do the forward pass and calculate the loss for a batch.
You can also do fancier things like multiple forward passes or something model specific.
Expand Down Expand Up @@ -639,7 +642,7 @@ def validation_step(self, *args, **kwargs):
Any of.

- Any object or value
- `None` - Validation will skip to the next batch
- ``None`` - Validation will skip to the next batch

.. code-block:: python

Expand Down Expand Up @@ -824,7 +827,7 @@ def test_step(self, *args, **kwargs):
Any of.

- Any object or value
- `None` - Testing will skip to the next batch
- ``None`` - Testing will skip to the next batch

.. code-block:: python

Expand Down