pytorch
1.Pytorch查看网络结构
from torchsummary import summary
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model = models.resnet18().to(device)
summary(model, (3,256,256))
注意:以上三种方法在处理输出为tuple时(如:LSTM),会有BUG
pytorch 踩坑之'tuple' object ha
原创
2021-05-14 21:32:54 ·
359 阅读 ·
0 评论