411 def create_model(network='resnet50', num_classes=13, input_shape=[500, 500, 3], transfer_learning=None):
413 network = network.lower()
415 if network ==
'xception':
417 model =
_xception(num_classes=num_classes, input_shape=input_shape, transfer_learning=transfer_learning)
419 elif network ==
'vgg16':
421 model =
_vgg16(num_classes=num_classes, input_shape=input_shape, transfer_learning=transfer_learning)
423 elif network ==
'vgg19':
425 model =
_vgg19(num_classes=num_classes, input_shape=input_shape, transfer_learning=transfer_learning)
427 elif network ==
'resnet18':
429 model =
_resnet18(num_classes=num_classes, input_shape=input_shape, transfer_learning=transfer_learning)
431 elif network ==
'resnet34':
433 model =
_resnet34(num_classes=num_classes, input_shape=input_shape, transfer_learning=transfer_learning)
435 elif network ==
'resnet50':
437 model =
_resnet50(num_classes=num_classes, input_shape=input_shape, transfer_learning=transfer_learning)
439 elif network ==
'resnet101':
441 model =
_resnet101(num_classes=num_classes, input_shape=input_shape, transfer_learning=transfer_learning)
443 elif network ==
'resnet152':
445 model =
_resnet152(num_classes=num_classes, input_shape=input_shape, transfer_learning=transfer_learning)
447 elif network ==
'inceptionv3':
449 model =
_inceptionv3(num_classes=num_classes, input_shape=input_shape, transfer_learning=transfer_learning)
451 elif network ==
'inceptionv4':
453 model =
_inceptionv4(num_classes=num_classes, input_shape=input_shape, transfer_learning=transfer_learning)
455 elif network ==
'inceptionresnetv2':
457 model =
_inceptionresnetv2(num_classes=num_classes, input_shape=input_shape, transfer_learning=transfer_learning)
459 elif network ==
'resnext':
461 model =
_resnext(num_classes=num_classes, input_shape=input_shape, transfer_learning=transfer_learning)
463 elif network ==
'seresnet18':
465 model =
_seresnet18(num_classes=num_classes, input_shape=input_shape, transfer_learning=transfer_learning)
467 elif network ==
'seresnet34':
469 model =
_seresnet34(num_classes=num_classes, input_shape=input_shape, transfer_learning=transfer_learning)
471 elif network ==
'seresnet50':
473 model =
_seresnet50(num_classes=num_classes, input_shape=input_shape, transfer_learning=transfer_learning)
475 elif network ==
'seresnet101':
477 model =
_seresnet101(num_classes=num_classes, input_shape=input_shape, transfer_learning=transfer_learning)
479 elif network ==
'seresnet154':
481 model =
_seresnet154(num_classes=num_classes, input_shape=input_shape, transfer_learning=transfer_learning)
483 elif network ==
'seresnetsaul':
485 model =
_seresnetsaul(num_classes=num_classes, input_shape=input_shape, transfer_learning=transfer_learning)
487 elif network ==
'seinceptionv3':
489 model =
_seinceptionv3(num_classes=num_classes, input_shape=input_shape, transfer_learning=transfer_learning)
491 elif network ==
'seinceptionresnetv2':
493 model =
_seinceptionresnetv2(num_classes=num_classes, input_shape=input_shape, transfer_learning=transfer_learning)
495 elif network ==
'seresnext':
497 model =
_seresnext(num_classes=num_classes, input_shape=input_shape, transfer_learning=transfer_learning)
499 elif network ==
'mobilenet':
501 model =
_mobilenet(num_classes=num_classes, input_shape=input_shape, transfer_learning=transfer_learning)
503 elif network ==
'densenet121':
505 model =
_densenet121(num_classes=num_classes, input_shape=input_shape, transfer_learning=transfer_learning)
507 elif network ==
'densenet169':
509 model =
_densenet169(num_classes=num_classes, input_shape=input_shape, transfer_learning=transfer_learning)
511 elif network ==
'densenet201':
513 model =
_densenet201(num_classes=num_classes, input_shape=input_shape, transfer_learning=transfer_learning)
517 model =
_mymodel(num_classes=num_classes, input_shape=input_shape, transfer_learning=transfer_learning)
520 def _resnet50(num_classes=13, input_shape=[500, transfer_learning=None)
def _inceptionv3(num_classes=13, input_shape=[500, transfer_learning=None)
def _vgg16(num_classes=13, input_shape=[500, transfer_learning=None)
def _densenet201(num_classes=13, input_shape=[500, transfer_learning=None)
def _seresnet101(num_classes=13, input_shape=[500, transfer_learning=None)
def _resnet152(num_classes=13, input_shape=[500, transfer_learning=None)
def _seinceptionresnetv2(num_classes=13, input_shape=[500, transfer_learning=None)
def _inceptionv4(num_classes=13, input_shape=[500, transfer_learning=None)
def _mymodel(num_classes=13, input_shape=[500, transfer_learning=None)
def _seinceptionv3(num_classes=13, input_shape=[500, transfer_learning=None)
def _inceptionresnetv2(num_classes=13, input_shape=[500, transfer_learning=None)
def _seresnet18(num_classes=13, input_shape=[500, transfer_learning=None)
def _seresnet154(num_classes=13, input_shape=[500, transfer_learning=None)
def _xception(num_classes=13, input_shape=[500, transfer_learning=None)
def _seresnext(num_classes=13, input_shape=[500, transfer_learning=None)
def _densenet121(num_classes=13, input_shape=[500, transfer_learning=None)
def _seresnetsaul(num_classes=13, input_shape=[500, transfer_learning=None)
def _resnet101(num_classes=13, input_shape=[500, transfer_learning=None)
def _densenet169(num_classes=13, input_shape=[500, transfer_learning=None)
def _mobilenet(num_classes=13, input_shape=[500, transfer_learning=None)
def create_model(network='resnet50', num_classes=13, input_shape=[500, transfer_learning=None)
def _resnext(num_classes=13, input_shape=[500, transfer_learning=None)
def _seresnet34(num_classes=13, input_shape=[500, transfer_learning=None)
def _resnet34(num_classes=13, input_shape=[500, transfer_learning=None)
def _seresnet50(num_classes=13, input_shape=[500, transfer_learning=None)
def _resnet18(num_classes=13, input_shape=[500, transfer_learning=None)
def _vgg19(num_classes=13, input_shape=[500, transfer_learning=None)