https://github.com/sovrasov/flops-counter.pytorch
From PyPI: pip install ptflops
or
From this repository: pip install --upgrade git+https://github.com/sovrasov/flops-counter.pytorch.git
# pth
eff_model = torchvision.models.efficientnet_b0()
# Check FLOPS
macs, params = get_model_complexity_info(eff_model, (3, 224, 224), as_strings=True, print_per_layer_stat=True, verbose=True)
print('{:<30} {:<8}'.format('Computational complexity : ', macs))
print('{:<30} {:<8}'.format('Number of parameters : ', params))
'Deep Learning > Pytorch' 카테고리의 다른 글
[ERROR] urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)> (0) | 2023.07.14 |
---|---|
C++, Pytorch 사용 예시 - Visual Studio 2019 (0) | 2022.11.15 |
C++, Pytorch 적용하기 02 (.pt 만들기) - Visual Studio 2019 (0) | 2022.11.02 |
33_Xception (0) | 2022.04.20 |
32_DenseNet (0) | 2022.04.11 |