Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# 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