</code></pre>
<p><br></p>
<h2 id="tensortolist">tensor.tolist</h2>
<p>Returns an Array with the tensor's data.</p>
<p>Example</p>
<pre><code class="language-javascript">&gt;&gt;&gt; let a = torch.randn([3,2], true, 'gpu');
&gt;&gt;&gt; let aArray = a.tolist();
&gt;&gt;&gt; console.log(aArray);
//[[0.001, -0.99],
// [-0.13, 0.333]
// [-0.91,-0.044]]
</code></pre>
<p><br></p>
<h2 id="tensordata">tensor.data</h2>
<p>Returns the tensor's data as a javascript Array.</p>
<p>Example</p>
<pre><code class="language-