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 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

TensorFlow 2.0 Quick Start Guide

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

Tony Holdroyd

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

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.

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que TensorFlow 2.0 Quick Start Guide est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  TensorFlow 2.0 Quick Start Guide par Tony Holdroyd en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Computer Science et Neural Networks. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2019
ISBN
9781789536966
Édition
1
Sous-sujet
Neural Networks

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...

Table des matiĂšres

  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
Normes de citation pour 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.