From d3ae26fcfc322b8d64f67b90722931e363769844 Mon Sep 17 00:00:00 2001 From: William Falcon Date: Wed, 30 Sep 2020 08:41:24 -0400 Subject: [PATCH] ref: decoupled ddp spawn (#3746) --- docs/source/lightning_module.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/lightning_module.rst b/docs/source/lightning_module.rst index 721892fd11..fe00120e01 100644 --- a/docs/source/lightning_module.rst +++ b/docs/source/lightning_module.rst @@ -393,7 +393,7 @@ If you want to calculate epoch-level metrics and log them, use the `.log` method loss = F.cross_entropy(y_hat, y) # logs metrics for each training_step, and the average across the epoch, to the progress bar and logger - result.log('train_loss', loss, on_step=True, on_epoch=True, prog_bar=True, logger=True) + self.log('train_loss', loss, on_step=True, on_epoch=True, prog_bar=True, logger=True) return loss The `.log` object automatically reduces the requested metrics across the full epoch.