Skip to content

Instantly share code, notes, and snippets.

@netsatsawat
Created June 18, 2019 06:09
Show Gist options
  • Save netsatsawat/c6257708bf3f2cb86731396fb02986fa to your computer and use it in GitHub Desktop.
Save netsatsawat/c6257708bf3f2cb86731396fb02986fa to your computer and use it in GitHub Desktop.
Create top layer
malaria_model = tf.keras.Sequential([features_extractor_layer,
layers.Dense(training_generator.num_classes,
activation='softmax')
])
malaria_model.summary()
malaria_model.compile(optimizer=tf.keras.optimizers.RMSprop(lr=0.001),
loss='categorical_crossentropy',
metrics=['acc'])
"""
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
lambda_1 (Lambda) (None, 1792) 0
_________________________________________________________________
dense (Dense) (None, 2) 3586
=================================================================
Total params: 3,586
Trainable params: 3,586
Non-trainable params: 0
_________________________________________________________________
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment