Create BlockArgs and GlobalParams for efficientnet model. Args: width_coefficient (float) depth_coefficient (float) image_size (int) dropout_rate (float) drop_connect_rate (float) num_classes (int) Meaning as the name suggests. Returns:
(width_coefficient=None, depth_coefficient=None, image_size=None,
dropout_rate=0.2, drop_connect_rate=0.2, num_classes=1000,
include_top=True, include_hm_decoder=False, head_conv=None,
heads=None, use_c2=False, use_c3=False, use_c4=False, use_c51=False,
num_layers=None, INIT_WEIGHTS=None, efpn=False, se_layer=False, tfpn=False)
| 229 | |
| 230 | |
| 231 | def efficientnet(width_coefficient=None, depth_coefficient=None, image_size=None, |
| 232 | dropout_rate=0.2, drop_connect_rate=0.2, num_classes=1000, |
| 233 | include_top=True, include_hm_decoder=False, head_conv=None, |
| 234 | heads=None, use_c2=False, use_c3=False, use_c4=False, use_c51=False, |
| 235 | num_layers=None, INIT_WEIGHTS=None, efpn=False, se_layer=False, tfpn=False): |
| 236 | """Create BlockArgs and GlobalParams for efficientnet model. |
| 237 | Args: |
| 238 | width_coefficient (float) |
| 239 | depth_coefficient (float) |
| 240 | image_size (int) |
| 241 | dropout_rate (float) |
| 242 | drop_connect_rate (float) |
| 243 | num_classes (int) |
| 244 | Meaning as the name suggests. |
| 245 | Returns: |
| 246 | blocks_args, global_params. |
| 247 | """ |
| 248 | |
| 249 | # Blocks args for the whole model(efficientnet-b0 by default) |
| 250 | # It will be modified in the construction of EfficientNet Class according to model |
| 251 | blocks_args = [ |
| 252 | 'r1_k3_s11_e1_i32_o16_se0.25', |
| 253 | 'r2_k3_s22_e6_i16_o24_se0.25', |
| 254 | 'r2_k5_s22_e6_i24_o40_se0.25', |
| 255 | 'r3_k3_s22_e6_i40_o80_se0.25', |
| 256 | 'r3_k5_s11_e6_i80_o112_se0.25', |
| 257 | 'r4_k5_s22_e6_i112_o192_se0.25', |
| 258 | 'r1_k3_s11_e6_i192_o320_se0.25', |
| 259 | ] |
| 260 | blocks_args = BlockDecoder.decode(blocks_args) |
| 261 | |
| 262 | global_params = GlobalParams( |
| 263 | width_coefficient=width_coefficient, |
| 264 | depth_coefficient=depth_coefficient, |
| 265 | image_size=image_size, |
| 266 | dropout_rate=dropout_rate, |
| 267 | |
| 268 | num_classes=num_classes, |
| 269 | batch_norm_momentum=0.99, |
| 270 | batch_norm_epsilon=1e-3, |
| 271 | drop_connect_rate=drop_connect_rate, |
| 272 | depth_divisor=8, |
| 273 | min_depth=None, |
| 274 | include_top=include_top, |
| 275 | include_hm_decoder=include_hm_decoder, |
| 276 | head_conv=head_conv, |
| 277 | heads=heads, |
| 278 | use_c2=use_c2, |
| 279 | use_c3=use_c3, |
| 280 | use_c4=use_c4, |
| 281 | use_c51=use_c51, |
| 282 | efpn=efpn, |
| 283 | tfpn=tfpn, |
| 284 | se_layer=se_layer, |
| 285 | num_layers=num_layers, |
| 286 | INIT_WEIGHTS=INIT_WEIGHTS |
| 287 | ) |
| 288 |
no test coverage detected