TorchInfo should say the size of the model, right?

I am not sure why TorchInfo is not reporting the size of the model.
My code looks like this
import torchinfo from torchinfo import summary summary(model_0, input_size=print(img_custom.shape)) # do a test pass through of an example input size
The model output looks like this:

Layer (type:depth-idx) Param #

TinyVGG –
├─Sequential: 1-1 –
│ └─Conv2d: 2-1 11,530
│ └─ReLU: 2-2 –
│ └─Conv2d: 2-3 910
│ └─ReLU: 2-4 –
│ └─MaxPool2d: 2-5 –
├─Sequential: 1-2 –
│ └─Conv2d: 2-6 910
│ └─ReLU: 2-7 –
│ └─Conv2d: 2-8 910
│ └─ReLU: 2-9 –
│ └─MaxPool2d: 2-10 –
├─Sequential: 1-3 –
│ └─Flatten: 2-11 –
│ └─Linear: 2-12 94,083

Total params: 108,343
Trainable params: 108,343
Non-trainable params: 0

It works for me using the latest torchinfo version:

from torchinfo import summary

model = models.resnet18()
batch_size = 16
summary(model, input_size=(batch_size, 3, 224, 224))
# ==========================================================================================
# Layer (type:depth-idx)                   Output Shape              Param #
# ==========================================================================================
# ResNet                                   [16, 1000]                --
# ├─Conv2d: 1-1                            [16, 64, 112, 112]        9,408
# ├─BatchNorm2d: 1-2                       [16, 64, 112, 112]        128
# ├─ReLU: 1-3                              [16, 64, 112, 112]        --
# ├─MaxPool2d: 1-4                         [16, 64, 56, 56]          --
# ├─Sequential: 1-5                        [16, 64, 56, 56]          --
# │    └─BasicBlock: 2-1                   [16, 64, 56, 56]          --
# │    │    └─Conv2d: 3-1                  [16, 64, 56, 56]          36,864
# ...
# │    │    └─ReLU: 3-51                   [16, 512, 7, 7]           --
# ├─AdaptiveAvgPool2d: 1-9                 [16, 512, 1, 1]           --
# ├─Linear: 1-10                           [16, 1000]                513,000
# ==========================================================================================
# Total params: 11,689,512
# Trainable params: 11,689,512
# Non-trainable params: 0
# Total mult-adds (G): 29.03
# ==========================================================================================
# Input size (MB): 9.63
# Forward/backward pass size (MB): 635.96
# Params size (MB): 46.76
# Estimated Total Size (MB): 692.35
# ==========================================================================================

Not sure if this is going to help, but it was working originally. Then something changed (not sure what) and it doesn’t show it anymore.