评价此页

torch.Tensor.nbytes

#

Tensor.nbytes#

返回消耗的字节数,如果 Tensor 不使用稀疏存储布局。定义为 numel() * element_size()