Thia project on fine-tuning a Bidirectional Transformers for Language Understanding (BERT) model for text classification with TensorFlow. This project includes preprocess and tokenize data for BERT classification, build TensorFlow input pipelines for text data with the tf.data API, and train and evaluate a fine-tuned BERT model for text classification with TensorFlow 2 and TensorFlow Hub.
CONTENTS (program structure)
- 1: Download and Import the Quora Insincere Questions Dataset
- 2: Create tf.data.Datasets for Training and Evaluation
- 3: Download a Pre-trained BERT Model from TensorFlow Hub
- 4: Tokenize and Preprocess Text for BERT
- 5: Wrap a Python Function into a TensorFlow op for Eager Execution
- 6: Create a TensorFlow Input Pipeline with
tf.data
- 7: Add a Classification Head to the BERT
hub.KerasLayer
- 8: Fine-Tune BERT for Text Classification
- 9: Evaluate the BERT Text Classification Model
Refrences and Reading