Fix Typo in pytorch/torch/autograd/__init__.py (#97024)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/97024
Approved by: https://github.com/Skylion007, https://github.com/soulitzer
This commit is contained in:
Luke Confait 2023-03-17 16:24:18 +00:00 committed by PyTorch MergeBot
parent 95575f0a5f
commit 46eaf4be7d

View File

@ -198,7 +198,7 @@ def backward(
if retain_graph is None:
retain_graph = create_graph
# The reason we repeat same the comment below is that
# The reason we repeat the same comment below is that
# some Python versions print out the first line of a multi-line function
# calls in the traceback and some print out the last line
Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass
@ -294,7 +294,7 @@ def grad(
if retain_graph is None:
retain_graph = create_graph
# The reason we repeat same the comment several times below is because
# The reason we repeat the same comment several times below is because
# some Python versions print out the first line of multi-line function
# calls in the traceback and some print out the last line
if is_grads_batched: