Skip to content

Commit 78918a9

Browse files
creafzBorda
authored andcommitted
Rename opt_idx to optimizer_idx in docs for complex training loops (#5712)
1 parent bde2e13 commit 78918a9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ with tempfile.NamedTemporaryFile(suffix='.onnx', delete=False) as tmpfile:
223223

224224
```python
225225
class LitAutoEncoder(pl.LightningModule):
226-
def training_step(self, batch, batch_idx, opt_idx):
226+
def training_step(self, batch, batch_idx, optimizer_idx):
227227
# access your optimizers with use_pl_optimizer=False. Default is True
228228
(opt_a, opt_b) = self.optimizers(use_pl_optimizer=True)
229229

docs/source/starter/new-project.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ Now you own the train loop!
268268

269269
.. code-block:: python
270270
271-
def training_step(self, batch, batch_idx, opt_idx):
271+
def training_step(self, batch, batch_idx, optimizer_idx):
272272
# access your optimizers with use_pl_optimizer=False. Default is True
273273
(opt_a, opt_b, opt_c) = self.optimizers(use_pl_optimizer=True)
274274

0 commit comments

Comments
 (0)