<h2 dir="auto"><g-emoji class="g-emoji" alias="rocket" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f680.png">🚀</g-emoji> Feature</h2>
<p dir="auto">Add <code class="notranslate">nbytes</code> and <code class="notranslate">itemsize</code> methods to Tensor. It has the same semantics as <a href="https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.ndarray.nbytes.html" rel="nofollow">https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.ndarray.nbytes.html</a> and <a href="https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.ndarray.itemsize.html" rel="nofollow">https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.ndarray.itemsize.html</a> (though, in keeping with PyTorch style, it is a function call, not a property).</p>
<h2 dir="auto">Motivation</h2>
<p dir="auto">The primary motivation is that caffe2::Tensor has these two methods, it's used somewhat frequently in the Caffe2 codebase, and it seems like a generally useful thing to have around.</p>
<h2 dir="auto">Alternatives</h2>
<ul dir="auto">
<li>Don't add them, and make users do the computation themselves. This might be a little annoying to do, because if we don't have <code class="notranslate">itemsize()</code> the user has to compute it themselves from the dtype.</li>
</ul>
<p dir="auto">I am unable to use pytorch with CUDA despite having installed it.</p>
<p dir="auto">OS: Windows 10<br>
Pytorch Version: 1.1.0<br>
CUDA Version: 10.0</p>
<p dir="auto">I get the following error. Any help would be appreciated.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/31413869/58431540-f5ad4300-80cb-11e9-8f04-cc6fe98acb1e.png"><img src="https://user-images.githubusercontent.com/31413869/58431540-f5ad4300-80cb-11e9-8f04-cc6fe98acb1e.png" alt="image" style="max-width: 100%;"></a></p>