pytorch-summary icon indicating copy to clipboard operation
pytorch-summary copied to clipboard

deeplabv3_resnet50 summary throws an error

Open pgrudzien12 opened this issue 4 years ago • 1 comments

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

pgrudzien12 avatar Aug 12 '21 11:08 pgrudzien12

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

SoumyadeepB avatar Mar 19 '22 02:03 SoumyadeepB