import torch
from torchvision.models import resnet18
from thop import profile
model = resnet18()
input = torch.randn(1, 3, 128, 128)
flops, params = profile(model, inputs=(input, ))
print('flops:{}'.format(flops))
print('params:{}'.format(params))
import torch
from torchvision.models import resnet18
from thop import profile
model = resnet18()
input = torch.randn(1, 3, 128, 128)
flops, params = profile(model, inputs=(input, ))
print('flops:{}'.format(flops))
print('params:{}'.format(params))