...

/

Using BERT for Text Classification

Using BERT for Text Classification

Let's use BERT to train a text classifier.

We'll cover the following...

In this lesson, we'll train a binary text classifier with BERT and tf.keras. We'll reuse some of the code we have used previously, but this time the code will be much shorter because we'll replace the embedding and LSTM layers with BERT. The complete code is available at the Jupyter notebook at the end. We'll skip the data preparation. We used the SMS Spam Collection dataset from Kaggle.

Let's get started by importing the BERT models and tokenizer:

Access this course and 1400+ top-rated courses and projects.