Python keras.applications.densenet.DenseNet169() Examples
The following are 1
code examples of keras.applications.densenet.DenseNet169().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
keras.applications.densenet
, or try the search function
.
Example #1
Source File: test_bench.py From Keras-inference-time-optimizer with MIT License | 4 votes |
def get_tst_neural_net(type): model = None custom_objects = dict() if type == 'mobilenet_small': from keras.applications.mobilenet import MobileNet model = MobileNet((128, 128, 3), depth_multiplier=1, alpha=0.25, include_top=True, weights='imagenet') elif type == 'mobilenet': from keras.applications.mobilenet import MobileNet model = MobileNet((224, 224, 3), depth_multiplier=1, alpha=1.0, include_top=True, weights='imagenet') elif type == 'mobilenet_v2': from keras.applications.mobilenetv2 import MobileNetV2 model = MobileNetV2((224, 224, 3), depth_multiplier=1, alpha=1.4, include_top=True, weights='imagenet') elif type == 'resnet50': from keras.applications.resnet50 import ResNet50 model = ResNet50(input_shape=(224, 224, 3), include_top=True, weights='imagenet') elif type == 'inception_v3': from keras.applications.inception_v3 import InceptionV3 model = InceptionV3(input_shape=(299, 299, 3), include_top=True, weights='imagenet') elif type == 'inception_resnet_v2': from keras.applications.inception_resnet_v2 import InceptionResNetV2 model = InceptionResNetV2(input_shape=(299, 299, 3), include_top=True, weights='imagenet') elif type == 'xception': from keras.applications.xception import Xception model = Xception(input_shape=(299, 299, 3), include_top=True, weights='imagenet') elif type == 'densenet121': from keras.applications.densenet import DenseNet121 model = DenseNet121(input_shape=(224, 224, 3), include_top=True, weights='imagenet') elif type == 'densenet169': from keras.applications.densenet import DenseNet169 model = DenseNet169(input_shape=(224, 224, 3), include_top=True, weights='imagenet') elif type == 'densenet201': from keras.applications.densenet import DenseNet201 model = DenseNet201(input_shape=(224, 224, 3), include_top=True, weights='imagenet') elif type == 'nasnetmobile': from keras.applications.nasnet import NASNetMobile model = NASNetMobile(input_shape=(224, 224, 3), include_top=True, weights='imagenet') elif type == 'nasnetlarge': from keras.applications.nasnet import NASNetLarge model = NASNetLarge(input_shape=(331, 331, 3), include_top=True, weights='imagenet') elif type == 'vgg16': from keras.applications.vgg16 import VGG16 model = VGG16(input_shape=(224, 224, 3), include_top=False, pooling='avg', weights='imagenet') elif type == 'vgg19': from keras.applications.vgg19 import VGG19 model = VGG19(input_shape=(224, 224, 3), include_top=False, pooling='avg', weights='imagenet') elif type == 'multi_io': model = get_custom_multi_io_model() elif type == 'multi_model_layer_1': model = get_custom_model_with_other_model_as_layer() elif type == 'multi_model_layer_2': model = get_small_model_with_other_model_as_layer() elif type == 'Conv2DTranspose': model = get_Conv2DTranspose_model() elif type == 'RetinaNet': model, custom_objects = get_RetinaNet_model() elif type == 'conv3d_model': model = get_simple_3d_model() return model, custom_objects