Pytorch查看模型指定层的参数 统计参数量 sum(p.numel() for p in model.parameters()) sum(p.numel() for p in model.parameters() if p.requires_grad) from torch import nn import torch #creat a simple model model = nn.Sequential( nn.Conv3d(1,16,kernel_size=1),