TensorFlow 2.0 Quick Start Guide
eBook - ePub

TensorFlow 2.0 Quick Start Guide

Get up to speed with the newly introduced features of TensorFlow 2.0

Tony Holdroyd

  1. 196 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

TensorFlow 2.0 Quick Start Guide

Get up to speed with the newly introduced features of TensorFlow 2.0

Tony Holdroyd

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

Perform supervised and unsupervised machine learning and learn advanced techniques such as training neural networks.

Key Features

  • Train your own models for effective prediction, using high-level Keras API
  • Perform supervised and unsupervised machine learning and learn advanced techniques such as training neural networks
  • Get acquainted with some new practices introduced in TensorFlow 2.0 Alpha

Book Description

TensorFlow is one of the most popular machine learning frameworks in Python. With this book, you will improve your knowledge of some of the latest TensorFlow features and will be able to perform supervised and unsupervised machine learning and also train neural networks.

After giving you an overview of what's new in TensorFlow 2.0 Alpha, the book moves on to setting up your machine learning environment using the TensorFlow library. You will perform popular supervised machine learning tasks using techniques such as linear regression, logistic regression, and clustering.

You will get familiar with unsupervised learning for autoencoder applications. The book will also show you how to train effective neural networks using straightforward examples in a variety of different domains.

By the end of the book, you will have been exposed to a large variety of machine learning and neural network TensorFlow techniques.

What you will learn

  • Use tf.Keras for fast prototyping, building, and training deep learning neural network models
  • Easily convert your TensorFlow 1.12 applications to TensorFlow 2.0-compatible files
  • Use TensorFlow to tackle traditional supervised and unsupervised machine learning applications
  • Understand image recognition techniques using TensorFlow
  • Perform neural style transfer for image hybridization using a neural network
  • Code a recurrent neural network in TensorFlow to perform text-style generation

Who this book is for

Data scientists, machine learning developers, and deep learning enthusiasts looking to quickly get started with TensorFlow 2 will find this book useful. Some Python programming experience with version 3.6 or later, along with a familiarity with Jupyter notebooks will be an added advantage. Exposure to machine learning and neural network techniques would also be helpful.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
TensorFlow 2.0 Quick Start Guide è disponibile online in formato PDF/ePub?
Sì, puoi accedere a TensorFlow 2.0 Quick Start Guide di Tony Holdroyd in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Neural Networks. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2019
ISBN
9781789536966
Edizione
1

Section 1: Introduction to TensorFlow 2.00 Alpha

In this section, we will introduce TensorFlow 2.00 alpha. We will begin with an overview of the major features of this machine learning ecosystem and see some examples of its use. We will then introduce TensorFlow's high-level Keras API. We will end the section with an investigation of artificial neural network technologies and techniques.
This section contains the following chapters:
  • Chapter 1, Introducing TensorFlow 2
  • Chapter 2, Keras, a High-Level API for TensorFlow 2
  • Chapter 3, ANN Technologies Using TensorFlow 2

Introducing TensorFlow 2

TensorFlow began its life in 2011 as DisBelief, an internal, closed source project at Google. DisBelief was a machine learning system that employed deep learning neural networks. This system morphed into TensorFlow, which was released to the developer community under an Apache 2.0 open source license, on November 9, 2015. Version 1.0.0 made its appearance on February 11, 2017. There have been a number of point releases since then that have incorporated a wealth of new features.
At the time of writing this book, the most recent version is TensorFlow 2.0.0 alpha release, which was announced at the TensorFlow Dev Summit on March 6, 2019.
TensorFlow takes its name from, well, tensors. A tensor is a generalization of vectors and matrices to possibly higher dimensions. The rank of a tensor is the number of indices it takes to uniquely specify each element of that tensor. A scalar (a simple number) is a tensor of rank 0, a vector is a tensor of rank 1, a matrix is a tensor of rank 2, and a 3-dimensional array is a tensor of rank 3. A tensor has a datatype and a shape (all of the data items in a tensor must have the same type). An example of a 4-dimensional tensor (that is, rank 4) is an image where the dimensions are an example within—batch, height, width, and color channel (for example):
image1 = tf.zeros([7, 28, 28, 3]) #  example-within-batch by height by width by color
Although TensorFlow can be leveraged for many areas of numerical computing in general, and machine learning in particular, its main area of research and development has been in the applications of Deep Neural Networks (DNN), where it has been used in diverse areas such as voice and sound recognition, for example, in the now widespread voice-activated assistants; text-based applications such as language translators; image recognition such as exo-planet hunting, cancer detection, and diagnosis; and time series applications such as recommendation systems.
In this chapter, we will discuss the following:
  • Looking at the modern TensorFlow ecosystem
  • Installing TensorFlow
  • Housekeeping and eager operations
  • Providing useful TensorFlow operations

Looking at the modern TensorFlow ecosystem

Let's discuss eager execution. The first incarnation of TensorFlow involved constructing a computational graph made up of operations and tensors, which had to be subsequently evaluated in what Google termed as session (this is known as declarative programming). This is still a common way to write TensorFlow programs. However, eager execution, available from release 1.5 onward in research form and baked into TensorFlow proper from release 1.7, involves the immediate evaluation of operations, with the consequence that tensors can be treated like NumPy arrays (this is known as imperative programming).
Google says that eager execution is the preferred method for research and development but that computational graphs are to be preferred for serving TensorFlow production applications.
tf.data is an API that allows you to build complicated data input pipelines from simpler, reusable parts. The highest level abstraction is Dataset, which comprises both elements of nested structures of tensors and a plan of transformations that are to act on those elements. There are classes for the following:
  • There's Dataset consisting of fixed length record sets from at least one binary file (FixedLengthRecordDataset)
  • There's Dataset consisting of records from at least one TFRecord file (TFRecordDataset)
  • There's Dataset consisting of records that are lines from at least one text file (TFRecordDataset)
  • There is also a class that represents the state of iterating through Dataset (tf.data.Iterator)
Let's move on to the estimator, which is a high-level API that allows you to build greatly simplified machine learning programs. Estimators take care of training, evaluation, prediction, and exports for serving.
TensorFlow.js is a collection of APIs that allow you to build and train models using either the low-level JavaScript linear algebra library or the high-level layers API. Hence, models can be trained and run in a browser.
TensorFlow Lite is a lightweight version of TensorFlow for mobile and embedded devices. It consists of a runtime interpreter and a set of utilities. The idea is that you train a model on a higher-powered machine and then convert your model into the .tflite format using the utilities. You then load the model into your device of choice. At the time of writing, TensorFlow Lite is supported on Android and iOS with a C++ API and has a Java wrapper for Android. If an Android device supports the Android Neural Networks (ANN) API for hardware acceleration, then the interpreter will use this, or else it will default to the CPU for execution.
TensorFlow Hub is a library designed to foster the publication, discovery, and use of reusable modules of machine learning models. In this context, a module is a self-contained piece of a TensorFlow graph together with its weights and other assets. The module can be reused in different tasks in a method known as transfer learning. The idea is that you t...

Indice dei contenuti

  1. Title Page
  2. Copyright and Credits
  3. Dedication
  4. About Packt
  5. Contributors
  6. Preface
  7. Section 1: Introduction to TensorFlow 2.00 Alpha
  8. Introducing TensorFlow 2
  9. Keras, a High-Level API for TensorFlow 2
  10. ANN Technologies Using TensorFlow 2
  11. Section 2: Supervised and Unsupervised Learning in TensorFlow 2.00 Alpha
  12. Supervised Machine Learning Using TensorFlow 2
  13. Unsupervised Learning Using TensorFlow 2
  14. Section 3: Neural Network Applications of TensorFlow 2.00 Alpha
  15. Recognizing Images with TensorFlow 2
  16. Neural Style Transfer Using TensorFlow 2
  17. Recurrent Neural Networks Using TensorFlow 2
  18. TensorFlow Estimators and TensorFlow Hub
  19. Converting from tf1.12 to tf2
  20. Other Books You May Enjoy
Stili delle citazioni per TensorFlow 2.0 Quick Start Guide

APA 6 Citation

Holdroyd, T. (2019). TensorFlow 2.0 Quick Start Guide (1st ed.). Packt Publishing. Retrieved from https://www.perlego.com/book/955583/tensorflow-20-quick-start-guide-get-up-to-speed-with-the-newly-introduced-features-of-tensorflow-20-pdf (Original work published 2019)

Chicago Citation

Holdroyd, Tony. (2019) 2019. TensorFlow 2.0 Quick Start Guide. 1st ed. Packt Publishing. https://www.perlego.com/book/955583/tensorflow-20-quick-start-guide-get-up-to-speed-with-the-newly-introduced-features-of-tensorflow-20-pdf.

Harvard Citation

Holdroyd, T. (2019) TensorFlow 2.0 Quick Start Guide. 1st edn. Packt Publishing. Available at: https://www.perlego.com/book/955583/tensorflow-20-quick-start-guide-get-up-to-speed-with-the-newly-introduced-features-of-tensorflow-20-pdf (Accessed: 14 October 2022).

MLA 7 Citation

Holdroyd, Tony. TensorFlow 2.0 Quick Start Guide. 1st ed. Packt Publishing, 2019. Web. 14 Oct. 2022.