How to print model summary of yolov5 model for a .pt file?
# Model
model = torch.hub.load('ultralytics/yolov5', 'yolov5s', device='cpu')
from torchstat import stat #try 1
stat(model, (3,640,640))
from torchsummary import summary #try 2
from torchinfo import summary #try 3
summary(model, (1,3,640,640))
I have tried torchsummary, torchinfo and torchstat. None of them work and errors out. Ideally, I want to check the output/input dimensions of every layer in the network.