Issue in printing model summary due to AttributeError: 'tuple' object has no attribute 'size'

I think the “fix” is to use the package from the forked repository:

pip install torchinfo
from torchinfo import summary

model = ConvNet()
batch_size = 16
summary(model, input_size=(batch_size, 1, 28, 28))
1 Like