Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
TensorFlow Developer Certificate Guide

You're reading from   TensorFlow Developer Certificate Guide Efficiently tackle deep learning and ML problems to ace the Developer Certificate exam

Arrow left icon
Product type Paperback
Published in Sep 2023
Publisher Packt
ISBN-13 9781803240138
Length 344 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Oluwole Fagbohun Oluwole Fagbohun
Author Profile Icon Oluwole Fagbohun
Oluwole Fagbohun
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Part 1 – Introduction to TensorFlow
2. Chapter 1: Introduction to Machine Learning FREE CHAPTER 3. Chapter 2: Introduction to TensorFlow 4. Chapter 3: Linear Regression with TensorFlow 5. Chapter 4: Classification with TensorFlow 6. Part 2 – Image Classification with TensorFlow
7. Chapter 5: Image Classification with Neural Networks 8. Chapter 6: Improving the Model 9. Chapter 7: Image Classification with Convolutional Neural Networks 10. Chapter 8: Handling Overfitting 11. Chapter 9: Transfer Learning 12. Part 3 – Natural Language Processing with TensorFlow
13. Chapter 10: Introduction to Natural Language Processing 14. Chapter 11: NLP with TensorFlow 15. Part 4 – Time Series with TensorFlow
16. Chapter 12: Introduction to Time Series, Sequences, and Predictions 17. Chapter 13: Time Series, Sequences, and Prediction with TensorFlow 18. Index 19. Other Books You May Enjoy

Improving the performance of the model

Earlier, we discussed some factors that we should consider as we designed our baseline architecture for sentiment analysis in this chapter. Also, in Chapter 8, Handling Overfitting, we explored some foundational concepts to mitigate against overfitting. There, we looked at ideas such as early stopping and dropout regularization. To curb overfitting, let’s begin by tuning some of our model’s hyperparameters. To do this, let’s construct a function called sentiment_model. This function takes in three parameters – vocab_size, embedding_dim, and the size of the training set.

Increasing the size of the vocabulary

One hyperparameter we may consider changing is the size of the vocabulary. Increasing the vocabulary size empowers the model to learn more unique words from our dataset. Let’s see how this will impact the performance of our base model. Here, we adjust vocab_size from 10000 to 20000, while keeping the...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image