add FGHIJ end setting

This commit is contained in:
nttstar
2018-01-29 23:03:01 +08:00
parent b7eaa08806
commit f8a39f8f14

View File

@@ -23,13 +23,19 @@ def get_fc1(last_conv, num_classes, fc_type):
fc1 = mx.sym.FullyConnected(data=body, num_hidden=num_classes, name='pre_fc1')
fc1 = mx.sym.BatchNorm(data=fc1, fix_gamma=True, eps=2e-5, momentum=bn_mom, name='fc1')
elif fc_type=='F':
bn1 = mx.sym.BatchNorm(data=body, fix_gamma=False, eps=2e-5, momentum=bn_mom, name='bn1')
relu1 = Act(data=bn1, act_type='relu', name='relu1')
body = mx.symbol.Dropout(data=relu1, p=0.4)
body = mx.sym.BatchNorm(data=body, fix_gamma=False, eps=2e-5, momentum=bn_mom, name='bn1')
body = mx.symbol.Dropout(data=body, p=0.4)
fc1 = mx.sym.FullyConnected(data=body, num_hidden=num_classes, name='fc1')
elif fc_type=='G':
body = mx.sym.BatchNorm(data=body, fix_gamma=False, eps=2e-5, momentum=bn_mom, name='bn1')
fc1 = mx.sym.FullyConnected(data=body, num_hidden=num_classes, name='fc1')
elif fc_type=='H':
fc1 = mx.sym.FullyConnected(data=body, num_hidden=num_classes, name='fc1')
elif fc_type=='I':
body = mx.sym.BatchNorm(data=body, fix_gamma=False, eps=2e-5, momentum=bn_mom, name='bn1')
fc1 = mx.sym.FullyConnected(data=body, num_hidden=num_classes, name='pre_fc1')
fc1 = mx.sym.BatchNorm(data=fc1, fix_gamma=True, eps=2e-5, momentum=bn_mom, name='fc1')
elif fc_type=='G':
body = mx.symbol.Dropout(data=body, p=0.4)
elif fc_type=='J':
fc1 = mx.sym.FullyConnected(data=body, num_hidden=num_classes, name='pre_fc1')
fc1 = mx.sym.BatchNorm(data=fc1, fix_gamma=True, eps=2e-5, momentum=bn_mom, name='fc1')
else: