From 78918a9e8e03d7d0db04cce71f7a7b36c72e8481 Mon Sep 17 00:00:00 2001 From: Alex Parinov Date: Sat, 30 Jan 2021 13:28:25 +0300 Subject: [PATCH] Rename opt_idx to optimizer_idx in docs for complex training loops (#5712) --- README.md | 2 +- docs/source/starter/new-project.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6114eb945e..0c737cb064 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/docs/source/starter/new-project.rst b/docs/source/starter/new-project.rst index e5e7032c65..ec043aa2fd 100644 --- a/docs/source/starter/new-project.rst +++ b/docs/source/starter/new-project.rst @@ -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)