Created
November 11, 2021 07:58
-
-
Save e96031413/42a1f5ca19d8518c96432a8026861879 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# thop(simple) | |
from thop import profile | |
model = mobilenetv3_large(width_mult=args.width_mult, num_classes=2) | |
input = torch.randn(1, 3, 224, 224) | |
macs, params = profile(model, inputs=(input, ), verbose=False) | |
print("%.2f | %.2f" % (params / (1000 ** 2), macs / (1000 ** 3))) | |
# torch info(detailed) | |
from torchinfo import summary | |
model = mobilenetv3_large(width_mult=args.width_mult, num_classes=2) | |
summary(model, input_size=(1, 3, 224, 224)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment