add Mish() support

This commit is contained in:
Glenn Jocher 2020-04-26 16:25:46 -07:00
parent 11f228eb00
commit 18d4ebfd12
1 changed files with 2 additions and 1 deletions

View File

@ -45,9 +45,10 @@ def create_modules(module_defs, img_size):
if mdef['activation'] == 'leaky': # activation study https://github.com/ultralytics/yolov3/issues/441 if mdef['activation'] == 'leaky': # activation study https://github.com/ultralytics/yolov3/issues/441
modules.add_module('activation', nn.LeakyReLU(0.1, inplace=True)) modules.add_module('activation', nn.LeakyReLU(0.1, inplace=True))
# modules.add_module('activation', nn.PReLU(num_parameters=1, init=0.10))
elif mdef['activation'] == 'swish': elif mdef['activation'] == 'swish':
modules.add_module('activation', Swish()) modules.add_module('activation', Swish())
elif mdef['activation'] == 'mish':
modules.add_module('activation', Mish())
elif mdef['type'] == 'BatchNorm2d': elif mdef['type'] == 'BatchNorm2d':
filters = output_filters[-1] filters = output_filters[-1]