評價此頁

torch.Tensor.nbytes#

Tensor.nbytes#

返回 Tensor 的元素“檢視”所佔用的位元組數,如果 Tensor 不使用稀疏儲存佈局。定義為 numel() * element_size()