sksq96 / pytorch-summary

Model summary in PyTorch similar to `model.summary()` in Keras
MIT License
4.01k stars 412 forks source link

deeplabv3_resnet50 summary throws an error #175

Open pgrudzien12 opened 3 years ago

pgrudzien12 commented 3 years ago

Maybe I'm not understanding something but with the following code summary throws an error:

import torch
from torchvision import models
from torchsummary import summary

device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
model = models.segmentation.deeplabv3_resnet50(pretrained=True).eval().to(device)

summary(model, (3, 224, 224))

Actual: Throws 'collections.OrderedDict' object has no attribute 'size'

Expected: Show the architecture

SoumyadeepB commented 2 years ago

This issue has been fixed. Please refer to this pull request.