Skip to content

Commit

Permalink
Fix make_image_classifier.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 296228856
  • Loading branch information
TensorFlow Hub Authors authored and vbardiovskyg committed Feb 24, 2020
1 parent 7f7d411 commit 571bb28
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,13 @@ def build_model(module_layer, hparams, image_size, num_classes):
"""
# TODO(b/139467904): Expose the hyperparameters below as flags.
model = tf.keras.Sequential([
module_layer,
tf.keras.Input(shape=(image_size[0], image_size[1], 3)), module_layer,
tf.keras.layers.Dropout(rate=hparams.dropout_rate),
tf.keras.layers.Dense(
num_classes,
activation="softmax",
kernel_regularizer=tf.keras.regularizers.l2(0.0001))
])
model.build((None, image_size[0], image_size[1], 3))
print(model.summary())
return model

Expand Down

0 comments on commit 571bb28

Please sign in to comment.