sudo pip3 install torchsummary
import torchvision.models as models from torchsummary import summary device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') vgg = models.vgg19().to(device) summary(vgg, (3, 224, 224)) #print(vgg) #print("Total number of paramerters in networks is {} ".format(sum(x.numel() for x in net.parameters())))
pytorch 输出网络结构(fine-tune 常用)
最新推荐文章于 2024-06-15 09:40:36 发布