This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
position_block_15 = base_model.get_layer('block_15_add') | |
for layer in base_model.layers: | |
layer.trainable = True | |
all_layers = base_model.layers | |
for i in range(base_model.layers.index(position_block_15)): | |
all_layers[i].trainable = False | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
base_model = tf.keras.applications.MobileNetV2(input_shape=(224,224,3), | |
alpha=1.0, | |
include_top=False, | |
weights="imagenet") | |
for layer in base_model.layers: | |
layer.trainable = False | |
model_transfered_1=Sequential() | |
model_transfered_1.add(base_model) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
base_model = tf.keras.applications.MobileNetV2(input_shape=(224,224,3), | |
alpha=1.0, | |
include_top=False, | |
weights="imagenet") | |
for layer in base_model.layers: | |
layer.trainable = False | |
model_transfered_1=Sequential() | |
model_transfered_1.add(base_model) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model=Sequential() | |
# Conv-layer-1 | |
model.add(Conv2D(32,(3,3),input_shape=(128,128,1))) | |
model.add(BatchNormalization()) | |
model.add(Activation('relu')) | |
model.add(MaxPooling2D(pool_size=(2,2))) | |
model.add(Dropout(0.3)) | |
# Conv-layer-2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model=Sequential() | |
# Conv-layer-1 | |
model.add(Conv2D(32,(3,3),input_shape=(128,128,1))) | |
model.add(BatchNormalization()) | |
model.add(Activation('relu')) | |
model.add(MaxPooling2D(pool_size=(2,2))) | |
# Conv-layer-2 | |
model.add(Conv2D(128,(5,5))) |