def get_model(): model = resnet50.ResNet50() if config.model == "resnet34": model = resnet34.ResNet34() if config.model == "resnet101": model = resnet101.ResNet101() if config.model == "resnet152": model = resnet152.ResNet152() model.build(input_shape=(None, config.image_height, config.image_width, config.channels)) model.summary() return model
def get_model(): model = resnet50.ResNet50() if config.model == "resnet34": model = resnet34.ResNet34() if config.model == "resnet101": model = resnet101.ResNet101() if config.model == "resnet152": model = resnet152.ResNet152() model.build(input_shape=(None, config.image_height, config.image_width, config.channels)) model.summary() tf.keras.utils.plot_model(model, to_file='model.png') return model
def get_model(flag): tf.keras.backend.set_learning_phase(flag) model = resnet50.ResNet50() if config.model == "resnet34": model = resnet34.ResNet34() if config.model == "resnet101": model = resnet101.ResNet101() if config.model == "resnet152": model = resnet152.ResNet152() model.build(input_shape=(None, config.image_height, config.image_width, config.channels)) model.summary() return model