 [-0.13, 0.333]
// [-0.91,-0.044]]
</code></pre>
<p><br></p>
<h2 id="tensorzero_grad">tensor.zero_grad</h2>
<p>Clears the gradients stored in this tensor. Sets the gadients to zero. This is used after the gradients have been used to update the parameters of a model, to set the model up for the next iteration.</p>
<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(