Add note about returning None (#5578)
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
This commit is contained in:
parent
5ff1306582
commit
3b43e5a4fc
|
@ -482,8 +482,11 @@ class LightningModule(
|
|||
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.
|
||||
|
@ -658,7 +661,7 @@ class LightningModule(
|
|||
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
|
||||
|
||||
|
@ -842,7 +845,7 @@ class LightningModule(
|
|||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue