From c41ca4ae5b217004969cec3254b903f537859005 Mon Sep 17 00:00:00 2001 From: Shoichiro Kawauchi Date: Fri, 29 Jan 2021 11:11:22 -0800 Subject: [PATCH] [doc]Fix autograd.detect_anomaly docs incorrectly formatted (#51335) Summary: Fixes https://github.com/pytorch/pytorch/issues/51141 Two bullet points don't render as bullet points. Before screenshot before After screenshot after Pull Request resolved: https://github.com/pytorch/pytorch/pull/51335 Reviewed By: izdeby Differential Revision: D26148582 Pulled By: ezyang fbshipit-source-id: 5aff6f9bd7affdf13bec965e9bf1a417e5caa88d --- torch/autograd/anomaly_mode.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/torch/autograd/anomaly_mode.py b/torch/autograd/anomaly_mode.py index 97def2dea3d0..05f88dbbe81a 100644 --- a/torch/autograd/anomaly_mode.py +++ b/torch/autograd/anomaly_mode.py @@ -7,9 +7,10 @@ class detect_anomaly(object): r"""Context-manager that enable anomaly detection for the autograd engine. This does two things: + - Running the forward pass with detection enabled will allow the backward - pass to print the traceback of the forward operation that created the failing - backward function. + pass to print the traceback of the forward operation that created the failing + backward function. - Any backward computation that generate "nan" value will raise an error. .. warning::