Closed monk42 closed 5 years ago
Summary of parameters and GFLOPs will show before training, you can see it in train.py
https://github.com/HRNet/HRNet-Image-Classification/blob/d698921d00358a7f37e1cf28f50c15ec1d3f3866/tools/train.py#L90
Or you can initialize your model and create an input like this:
# first you need define your model
x = torch.randn((1, 3, 224, 224))
print(get_model_summary(model, x))
Thanks ,Why computs for Convolution and Linear Layers only ? what about relu layer and bn layer?
When inference, BN can be combined with convolution. And GFLOPs of nonlinearity will not be involved in. For more details, you can refer to these papers: ShuffleNetV2, Pruning Convolutional Neural Networks for Resource Efficient Inference, etc.
Thanks!
Thanks !