Skip to content

Commit

Permalink
fixed typo in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoleao052 committed Oct 21, 2024
1 parent 3bead3c commit 17c899b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions site/tensor/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ <h2 id="torchrand">torch.rand</h2>
</code></pre>
<p><br></p>
<h2 id="torchrandint">torch.randint</h2>
<pre><code>torch.rand(low,
<pre><code>torch.randint(low,
high,
*shape,
requires_grad=false,
Expand All @@ -809,7 +809,7 @@ <h2 id="torchrandint">torch.randint</h2>
<li><strong>device (string)</strong> - Device to store Tensor. Either "gpu" or "cpu". If your device has a gpu, large models will train faster on it.</li>
</ul>
<p>Example</p>
<pre><code class="language-javascript">&gt;&gt;&gt; let a = torch.rand([3,2], false, 'gpu');
<pre><code class="language-javascript">&gt;&gt;&gt; let a = torch.randint([3,2], false, 'gpu');
&gt;&gt;&gt; console.log(a.data);
//[[0.011, 0.122],
// [-0.03, 0.105]
Expand Down

0 comments on commit 17c899b

Please sign in to comment.