Mastering TensorFlow 1.x
eBook - ePub

Mastering TensorFlow 1.x

Armando Fandango, Nick McClure

  1. 474 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Mastering TensorFlow 1.x

Armando Fandango, Nick McClure

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

Build, scale, and deploy deep neural network models using the star libraries in Python

Key Features

  • Delve into advanced machine learning and deep learning use cases using Tensorflow and Keras
  • Build, deploy, and scale end-to-end deep neural network models in a production environment
  • Learn to deploy TensorFlow on mobile, and distributed TensorFlow on GPU, Clusters, and Kubernetes

Book Description

TensorFlow is the most popular numerical computation library built from the ground up for distributed, cloud, and mobile environments. TensorFlow represents the data as tensors and the computation as graphs.

This book is a comprehensive guide that lets you explore the advanced features of TensorFlow 1.x. Gain insight into TensorFlow Core, Keras, TF Estimators, TFLearn, TF Slim, Pretty Tensor, and Sonnet. Leverage the power of TensorFlow and Keras to build deep learning models, using concepts such as transfer learning, generative adversarial networks, and deep reinforcement learning. Throughout the book, you will obtain hands-on experience with varied datasets, such as MNIST, CIFAR-10, PTB, text8, and COCO-Images.

You will learn the advanced features of TensorFlow1.x, such as distributed TensorFlow with TF Clusters, deploy production models with TensorFlow Serving, and build and deploy TensorFlow models for mobile and embedded devices on Android and iOS platforms. You will see how to call TensorFlow and Keras API within the R statistical software, and learn the required techniques for debugging when the TensorFlow API-based code does not work as expected.

The book helps you obtain in-depth knowledge of TensorFlow, making you the go-to person for solving artificial intelligence problems. By the end of this guide, you will have mastered the offerings of TensorFlow and Keras, and gained the skills you need to build smarter, faster, and efficient machine learning and deep learning systems.

What you will learn

  • Master advanced concepts of deep learning such as transfer learning, reinforcement learning, generative models and more, using TensorFlow and Keras
  • Perform supervised (classification and regression) and unsupervised (clustering) learning to solve machine learning tasks
  • Build end-to-end deep learning (CNN, RNN, and Autoencoders) models with TensorFlow
  • Scale and deploy production models with distributed and high-performance computing on GPU and clusters
  • Build TensorFlow models to work with multilayer perceptrons using Keras, TFLearn, and R
  • Learn the functionalities of smart apps by building and deploying TensorFlow models on iOS and Android devices
  • Supercharge TensorFlow with distributed training and deployment on Kubernetes and TensorFlow Clusters

Who this book is for

This book is for data scientists, machine learning engineers, artificial intelligence engineers, and for all TensorFlow users who wish to upgrade their TensorFlow knowledge and work on various machine learning and deep learning problems. If you are looking for an easy-to-follow guide that underlines the intricacies and complex use cases of machine learning, you will find this book extremely useful. Some basic understanding of TensorFlow is required to get the most out of the book.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Mastering TensorFlow 1.x un PDF/ePUB en línea?
Sí, puedes acceder a Mastering TensorFlow 1.x de Armando Fandango, Nick McClure en formato PDF o ePUB, así como a otros libros populares de Informatik y Data Mining. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2018
ISBN
9781788297004
Edición
1
Categoría
Informatik
Categoría
Data Mining

Transfer Learning and Pre-Trained Models

In simple words, transfer learning means that you take a pre-trained model trained to predict one kind of class, and then either use it directly or re-train only a small part of it, in order to predict another kind of class. For example, you can take a pre-trained model to identify types of cats, and then retrain only small parts of the model on the types of dogs and then use it to predict the types of dogs.
Without transfer learning, training a huge model on large datasets would take several days or even months. However, with transfer learning, by taking a pre-trained model, and only training the last couple of layers, we save a lot of time in training the model from scratch.
Transfer learning is also useful when you don't have a huge dataset. The models trained on small datasets may not be able to detect features that a model trained on large datasets can. Thus with transfer learning, you can get better models, even with smaller datasets.
In this chapter, we shall take pre-trained models and train them on new objects. We show examples of pre-trained models with images and apply them to image classification problems. You should try to find other pre-trained models and apply them to different problems such as object detection, text generation or machine translation. The following topics will be covered in this chapter:
  • ImageNet dataset
  • Retraining or fine-tuning the models
  • COCO animals dataset and preprocessing
  • Image classification using pre-trained VGG16 in TensorFlow
  • Image preprocessing in TensorFlow for pre-trained VGG16
  • Image classification using retrained VGG16 in TensorFlow
  • Image classification using pre-trained VGG16 in Keras
  • Image classification using retrained VGG16 in Keras
  • Image classification using Inception v3 in TensorFlow
  • Image classification using retrained Inception v3 in TensorFlow

ImageNet dataset

According to http://image-net.org:
ImageNet is an image dataset organized according to the WordNet hierarchy. Each meaningful concept in WordNet, possibly described by multiple words or word phrases, is called a synonym set or synset.
The ImageNet has about 100 K synsets and on average, about 1,000 human-annotated images for each synset. ImageNet only stores the references to the images while the images are stored in their original locations on the internet. In deep learning papers, the ImageNet-1K refers to the dataset released as part of ImageNet's Large Scale Visual Recognition Challenge (ILSVRC) to classify the dataset into 1,000 categories:
The 1,000 categories for the challenges can be found at the following URLs:
http://image-net.org/challenges/LSVRC/2017/browse-synsets
http://image-net.org/challenges/LSVRC/2016/browse-synsets
http://image-net.org/challenges/LSVRC/2015/browse-synsets
http://image-net.org/challenges/LSVRC/2014/browse-synsets
http://image-net.org/challenges/LSVRC/2013/browse-synsets
http://image-net.org/challenges/LSVRC/2012/browse-synsets
http://image-net.org/challenges/LSVRC/2011/browse-synsets
http://image-net.org/challenges/LSVRC/2010/browse-synsets.
We have written a custom function to download the ImageNet labels from Google:
def build_id2label(self):
base_url = 'https://raw.githubusercontent.com/tensorflow/models/master/research/inception/inception/data/'
synset_url = '{}/imagenet_lsvrc_2015_synsets.txt'.format(base_url)
synset_to_human_url = '{}/imagenet_metadata.txt'.format(base_url)

filename, _ = urllib.request.urlretrieve(synset_url)
synset_list = [s.strip() for s in open(filename).readlines()]
nu...

Índice

  1. Title Page
  2. Copyright and Credits
  3. Packt Upsell
  4. Foreword
  5. Contributors
  6. Preface
  7. TensorFlow 101
  8. High-Level Libraries for TensorFlow
  9. Keras 101
  10. Classical Machine Learning with TensorFlow
  11. Neural Networks and MLP with TensorFlow and Keras
  12. RNN with TensorFlow and Keras
  13. RNN for Time Series Data with TensorFlow and Keras
  14. RNN for Text Data with TensorFlow and Keras
  15. CNN with TensorFlow and Keras
  16. Autoencoder with TensorFlow and Keras
  17. TensorFlow Models in Production with TF Serving
  18. Transfer Learning and Pre-Trained Models
  19. Deep Reinforcement Learning
  20. Generative Adversarial Networks
  21. Distributed Models with TensorFlow Clusters
  22. TensorFlow Models on Mobile and Embedded Platforms
  23. TensorFlow and Keras in R
  24. Debugging TensorFlow Models
  25. Tensor Processing Units
  26. Other Books You May Enjoy
Estilos de citas para Mastering TensorFlow 1.x

APA 6 Citation

Fandango, A. (2018). Mastering TensorFlow 1.x (1st ed.). Packt Publishing. Retrieved from https://www.perlego.com/book/578781/mastering-tensorflow-1x-pdf (Original work published 2018)

Chicago Citation

Fandango, Armando. (2018) 2018. Mastering TensorFlow 1.x. 1st ed. Packt Publishing. https://www.perlego.com/book/578781/mastering-tensorflow-1x-pdf.

Harvard Citation

Fandango, A. (2018) Mastering TensorFlow 1.x. 1st edn. Packt Publishing. Available at: https://www.perlego.com/book/578781/mastering-tensorflow-1x-pdf (Accessed: 14 October 2022).

MLA 7 Citation

Fandango, Armando. Mastering TensorFlow 1.x. 1st ed. Packt Publishing, 2018. Web. 14 Oct. 2022.