FLOPs update
This commit is contained in:
parent
105882b3c6
commit
108334db29
|
@ -89,9 +89,9 @@ def model_info(model, verbose=False):
|
||||||
(i, name, p.requires_grad, p.numel(), list(p.shape), p.mean(), p.std()))
|
(i, name, p.requires_grad, p.numel(), list(p.shape), p.mean(), p.std()))
|
||||||
print('Model Summary: %g layers, %g parameters, %g gradients' % (len(list(model.parameters())), n_p, n_g))
|
print('Model Summary: %g layers, %g parameters, %g gradients' % (len(list(model.parameters())), n_p, n_g))
|
||||||
|
|
||||||
# FLOPS report
|
# FLOPs
|
||||||
# from thop import profile
|
# from thop import profile
|
||||||
# macs, params = profile(model, inputs=(torch.zeros(1, 3, 608, 608),))
|
# macs, params = profile(model, inputs=(torch.zeros(1, 3, 640, 640),))
|
||||||
# print('%.3f GFLOPs' % (macs / 1E9 * 2))
|
# print('%.3f GFLOPs' % (macs / 1E9 * 2))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue