Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Machine Learning with TensorFlow 1.x

You're reading from   Machine Learning with TensorFlow 1.x Second generation machine learning with Google's brainchild - TensorFlow 1.x

Arrow left icon
Product type Paperback
Published in Nov 2017
Publisher Packt
ISBN-13 9781786462961
Length 304 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (3):
Arrow left icon
Saif Ahmed Saif Ahmed
Author Profile Icon Saif Ahmed
Saif Ahmed
Quan Hua Quan Hua
Author Profile Icon Quan Hua
Quan Hua
Shams Ul Azeem Shams Ul Azeem
Author Profile Icon Shams Ul Azeem
Shams Ul Azeem
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Getting Started with TensorFlow FREE CHAPTER 2. Your First Classifier 3. The TensorFlow Toolbox 4. Cats and Dogs 5. Sequence to Sequence Models-Parlez-vous Français? 6. Finding Meaning 7. Making Money with Machine Learning 8. The Doctor Will See You Now 9. Cruise Control - Automation 10. Go Live and Go Big 11. Going Further - 21 Problems 12. Advanced Installation

Training day

The crux of our effort will be the training, which is shown in the second file we encountered earlier—translate.py. The prepare_wmt_dataset function we reviewed earlier is, of course, the starting point as it creates our two datasets and tokenizes them into nice clean numbers.

The training starts as follows:

After preparing the data, we will create a TensorFlow session, as usual, and construct our model. We'll get to the model later; for now, let's look at our preparation and training loop.

We will define a dev set and a training set later, but for now, we will define a scale that is a floating point score ranging from 0 to 1. Nothing complex here; the real work comes in the following training loop. This is very different from what we've done in previous chapters, so close attention is required.

Our main training loop is seeking to minimize...

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 €18.99/month. Cancel anytime