Rename opt_idx to optimizer_idx in docs for complex training loops (#5712)
This commit is contained in:
parent
bde2e133bf
commit
78918a9e8e
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue