Rename opt_idx to optimizer_idx in docs for complex training loops (#5712)

This commit is contained in:
Alex Parinov 2021-01-30 13:28:25 +03:00 committed by Jirka Borovec
parent bde2e133bf
commit 78918a9e8e
2 changed files with 2 additions and 2 deletions

View File

@ -223,7 +223,7 @@ with tempfile.NamedTemporaryFile(suffix='.onnx', delete=False) as tmpfile:
```python
class LitAutoEncoder(pl.LightningModule):
def training_step(self, batch, batch_idx, opt_idx):
def training_step(self, batch, batch_idx, optimizer_idx):
# access your optimizers with use_pl_optimizer=False. Default is True
(opt_a, opt_b) = self.optimizers(use_pl_optimizer=True)

View File

@ -268,7 +268,7 @@ Now you own the train loop!
.. code-block:: python
def training_step(self, batch, batch_idx, opt_idx):
def training_step(self, batch, batch_idx, optimizer_idx):
# access your optimizers with use_pl_optimizer=False. Default is True
(opt_a, opt_b, opt_c) = self.optimizers(use_pl_optimizer=True)