torch.Tensor.nbytes#
- Tensor.nbytes#
Returns the number of bytes consumed by the “view” of elements of the Tensor if the Tensor does not use sparse storage layout. Defined to be
numel()*element_size()
Returns the number of bytes consumed by the “view” of elements of the Tensor
if the Tensor does not use sparse storage layout.
Defined to be numel() * element_size()