torch.Tensor.nbytes
Paddle 无此 API,需要组合实现。
# PyTorch 写法 y = a.nbytes # Paddle 写法 y = a.size * a.element_size()