FLOPs at 480x640, BN init
This commit is contained in:
parent
1038b0d269
commit
77e6bdd3c1
|
@ -55,8 +55,8 @@ def initialize_weights(model):
|
|||
if isinstance(m, nn.Conv2d):
|
||||
nn.init.kaiming_normal_(m.weight, mode='fan_out', nonlinearity='relu')
|
||||
elif isinstance(m, nn.BatchNorm2d):
|
||||
m.weight.data.fill_(1)
|
||||
m.bias.data.zero_()
|
||||
m.eps = 1e-4
|
||||
m.momentum = 0.03
|
||||
|
||||
|
||||
def fuse_conv_and_bn(conv, bn):
|
||||
|
@ -99,7 +99,7 @@ def model_info(model, verbose=False):
|
|||
|
||||
try: # FLOPS
|
||||
from thop import profile
|
||||
macs, _ = profile(model, inputs=(torch.zeros(1, 3, 640, 640),))
|
||||
macs, _ = profile(model, inputs=(torch.zeros(1, 3, 480, 640),))
|
||||
fs = ', %.1f GFLOPS' % (macs / 1E9 * 2)
|
||||
except:
|
||||
fs = ''
|
||||
|
|
Loading…
Reference in New Issue