Skip to content

Commit

Permalink
Update KerasNLP quickstart example (#1491)
Browse files Browse the repository at this point in the history
Forgot to sync a change to keras.io landing page!
  • Loading branch information
mattdangerw authored Aug 16, 2023
1 parent 4089bcb commit 34c7c1a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion templates/keras_nlp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ imdb_train, imdb_test = tfds.load(
batch_size=16,
)
# Load a BERT model.
classifier = keras_nlp.models.BertClassifier.from_preset("bert_base_en_uncased")
classifier = keras_nlp.models.BertClassifier.from_preset(
"bert_base_en_uncased",
num_classes=2,
)
# Fine-tune on IMDb movie reviews.
classifier.fit(imdb_train, validation_data=imdb_test)
# Predict two new examples.
Expand Down

0 comments on commit 34c7c1a

Please sign in to comment.