Fine Tune BERT for Text Classification with TensorFlow

106 ratings
Offered By
Coursera Project Network
6,210 already enrolled
In this Free Guided Project, you will:

Build TensorFlow Input Pipelines for Text Data with the API

Tokenize and Preprocess Text for BERT

Fine-tune BERT for text classification with TensorFlow 2 and TensorFlow Hub

Showcase this hands-on experience in an interview

Clock2.5 hours
CloudNo download needed
VideoSplit-screen video
Comment DotsEnglish
LaptopDesktop only

This is a guided project on fine-tuning a Bidirectional Transformers for Language Understanding (BERT) model for text classification with TensorFlow. In this 2.5 hour long project, you will learn to preprocess and tokenize data for BERT classification, build TensorFlow input pipelines for text data with the API, and train and evaluate a fine-tuned BERT model for text classification with TensorFlow 2 and TensorFlow Hub. Prerequisites: In order to successfully complete this project, you should be competent in the Python programming language, be familiar with deep learning for Natural Language Processing (NLP), and have trained models with TensorFlow or and its Keras API. Note: This course works best for learners who are based in the North America region. We’re currently working on providing the same experience in other regions.


It is assumed that are competent in Python programming and have prior experience with building deep learning NLP models with TensorFlow or Keras

Skills you will develop

  • natural-language-processing
  • Tensorflow
  • machine-learning
  • deep-learning
  • BERT

Learn step-by-step

In a video that plays in a split-screen with your work area, your instructor will walk you through these steps:

  1. Introduction to the Project

  2. Setup your TensorFlow and Colab Runtime

  3. Download and Import the Quora Insincere Questions Dataset

  4. Create for Training and Evaluation

  5. Download a Pre-trained BERT Model from TensorFlow Hub

  6. Tokenize and Preprocess Text for BERT

  7. Wrap a Python Function into a TensorFlow op for Eager Execution

  8. Create a TensorFlow Input Pipeline with

  9. Add a Classification Head to the BERT hub.KerasLayer

  10. Fine-Tune and Evaluate BERT for Text Classification

How Guided Projects work

Your workspace is a cloud desktop right in your browser, no download required

In a split-screen video, your instructor guides you step-by-step



View all reviews

Frequently asked questions

Frequently Asked Questions

More questions? Visit the Learner Help Center.