y tensor that led to this one with gradients relative to <strong>this</strong> tensor.</p>
<blockquote>
<p><strong>Note:</strong> This only happens to tensors that have <code>requires_grad</code> set to true.</p>
</blockquote>
<p>Example</p>
<pre><code class="language-javascript">&gt;&gt;&gt; let a = torch.randn([3,2], true, 'gpu');
&gt;&gt;&gt; let b = torch.randn([2,4], false, 'gpu');
&gt;&gt;&gt; let c = torch.matmul(a,b);
&gt;&gt;&gt; c.backward();
&gt;&gt;&gt; console.log(a.grad);
//[[0.001, -0.99],
//