Darknet Convolution2D followed by BatchNormalization and LeakyReLU.
(*args, **kwargs)
| 23 | return Conv2D(*args, **darknet_conv_kwargs) |
| 24 | |
| 25 | def DarknetConv2D_BN_Leaky(*args, **kwargs): |
| 26 | """Darknet Convolution2D followed by BatchNormalization and LeakyReLU.""" |
| 27 | no_bias_kwargs = {'use_bias': False} |
| 28 | no_bias_kwargs.update(kwargs) |
| 29 | return compose( |
| 30 | DarknetConv2D(*args, **no_bias_kwargs), |
| 31 | BatchNormalization(), |
| 32 | LeakyReLU(alpha=0.1)) |
| 33 | |
| 34 | def resblock_body(x, num_filters, num_blocks): |
| 35 | '''A series of resblocks starting with a downsampling Convolution2D''' |
no test coverage detected