pytorch 中的numel()函数的功能是输出张量中参数的个数
>>> import torch
>>> x=torch.arange(12)
>>> a =x.numel()
>>> print(a)
12
>>> print(x.shape)
torch.Size([12])
>>>
pytorch 中的numel()函数的功能是输出张量中参数的个数
>>> import torch
>>> x=torch.arange(12)
>>> a =x.numel()
>>> print(a)
12
>>> print(x.shape)
torch.Size([12])
>>>