You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
parameter of <cite>torch.autograd.backward</cite>. If provided, it must have the same structure as
308
-
<codeclass="docutils literal notranslate"><spanclass="pre">tensors</span></code> and each tensor in <codeclass="docutils literal notranslate"><spanclass="pre">jac_tensors</span></code> must match the shape of the corresponding
parameter of <aclass="reference external" href="https://docs.pytorch.org/docs/stable/generated/torch.autograd.backward.html#torch.autograd.backward" title="(in PyTorch v2.10)"><codeclass="xref py py-func docutils literal notranslate"><spanclass="pre">torch.autograd.backward()</span></code></a>. If provided, it must have the same structure
308
+
as <codeclass="docutils literal notranslate"><spanclass="pre">tensors</span></code> and each tensor in <codeclass="docutils literal notranslate"><spanclass="pre">jac_tensors</span></code> must match the shape of the corresponding
309
309
tensor in <codeclass="docutils literal notranslate"><spanclass="pre">tensors</span></code>, with an extra leading dimension representing the number of rows of
310
310
the resulting Jacobian (e.g. the number of losses). All tensors in <codeclass="docutils literal notranslate"><spanclass="pre">jac_tensors</span></code> must
311
311
have the same first dimension. If <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>, defaults to the identity matrix. In this case,
Copy file name to clipboardExpand all lines: latest/docs/autojac/jac/index.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -308,7 +308,7 @@ <h1>jac<a class="headerlink" href="#jac" title="Link to this heading">¶</a></h1
308
308
their <codeclass="docutils literal notranslate"><spanclass="pre">requires_grad</span></code> flag set to <codeclass="docutils literal notranslate"><spanclass="pre">True</span></code>. If not provided, defaults to the leaf tensors
309
309
that were used to compute the <codeclass="docutils literal notranslate"><spanclass="pre">outputs</span></code> parameter.</p></li>
parameter of <codeclass="docutils literal notranslate"><spanclass="pre">torch.autograd.grad</span></code>. If provided, it must have the same structure as
311
+
parameter of <aclass="reference external" href="https://docs.pytorch.org/docs/stable/generated/torch.autograd.grad.html#torch.autograd.grad" title="(in PyTorch v2.10)"><codeclass="xref py py-func docutils literal notranslate"><spanclass="pre">torch.autograd.grad()</span></code></a>. If provided, it must have the same structure as
312
312
<codeclass="docutils literal notranslate"><spanclass="pre">outputs</span></code> and each tensor in <codeclass="docutils literal notranslate"><spanclass="pre">jac_outputs</span></code> must match the shape of the corresponding
313
313
tensor in <codeclass="docutils literal notranslate"><spanclass="pre">outputs</span></code>, with an extra leading dimension representing the number of rows of
314
314
the resulting Jacobian (e.g. the number of losses). If <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>, defaults to the identity
Copy file name to clipboardExpand all lines: latest/docs/autojac/mtl_backward/index.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -314,7 +314,7 @@ <h1>mtl_backward<a class="headerlink" href="#mtl-backward" title="Link to this h
314
314
<li><p><strong>features</strong> (<spanclass="sphinx_autodoc_typehints-type"><aclass="reference external" href="https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence" title="(in Python v3.14)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Sequence</span></code></a>[<aclass="reference external" href="https://docs.pytorch.org/docs/stable/tensors.html#torch.Tensor" title="(in PyTorch v2.10)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Tensor</span></code></a>] | <aclass="reference external" href="https://docs.pytorch.org/docs/stable/tensors.html#torch.Tensor" title="(in PyTorch v2.10)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Tensor</span></code></a></span>) – The last shared representation used for all tasks, as given by the feature
315
315
extractor. Should be non-empty.</p></li>
316
316
<li><p><strong>grad_tensors</strong> (<spanclass="sphinx_autodoc_typehints-type"><aclass="reference external" href="https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence" title="(in Python v3.14)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Sequence</span></code></a>[<aclass="reference external" href="https://docs.pytorch.org/docs/stable/tensors.html#torch.Tensor" title="(in PyTorch v2.10)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Tensor</span></code></a>] | <aclass="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">None</span></code></a></span>) – The initial gradients to backpropagate, analog to the <codeclass="docutils literal notranslate"><spanclass="pre">grad_tensors</span></code>
317
-
parameter of <codeclass="docutils literal notranslate"><spanclass="pre">torch.autograd.backward</span></code>. If any of the <codeclass="docutils literal notranslate"><spanclass="pre">tensors</span></code> is non-scalar,
317
+
parameter of <aclass="reference external" href="https://docs.pytorch.org/docs/stable/generated/torch.autograd.backward.html#torch.autograd.backward" title="(in PyTorch v2.10)"><codeclass="xref py py-func docutils literal notranslate"><spanclass="pre">torch.autograd.backward()</span></code></a>. If any of the <codeclass="docutils literal notranslate"><spanclass="pre">tensors</span></code> is non-scalar,
318
318
<codeclass="docutils literal notranslate"><spanclass="pre">grad_tensors</span></code> must be provided, with the same length and shapes as <codeclass="docutils literal notranslate"><spanclass="pre">tensors</span></code>.
319
319
Otherwise, this parameter is not needed and will default to scalars of 1.</p></li>
0 commit comments