TensorFlow Machine Learning Projects
eBook - ePub

TensorFlow Machine Learning Projects

Build 13 real-world projects with advanced numerical computations using the Python ecosystem

Ankit Jain, Armando Fandango, Amita Kapoor

Share book
  1. 322 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

TensorFlow Machine Learning Projects

Build 13 real-world projects with advanced numerical computations using the Python ecosystem

Ankit Jain, Armando Fandango, Amita Kapoor

Book details
Book preview
Table of contents
Citations

About This Book

Implement TensorFlow's offerings such as TensorBoard, TensorFlow.js, TensorFlow Probability, and TensorFlow Lite to build smart automation projects

Key Features

  • Use machine learning and deep learning principles to build real-world projects
  • Get to grips with TensorFlow's impressive range of module offerings
  • Implement projects on GANs, reinforcement learning, and capsule network

Book Description

TensorFlow has transformed the way machine learning is perceived. TensorFlow Machine Learning Projects teaches you how to exploit the benefits—simplicity, efficiency, and flexibility—of using TensorFlow in various real-world projects. With the help of this book, you'll not only learn how to build advanced projects using different datasets but also be able to tackle common challenges using a range of libraries from the TensorFlow ecosystem.

To start with, you'll get to grips with using TensorFlow for machine learning projects; you'll explore a wide range of projects using TensorForest and TensorBoard for detecting exoplanets, TensorFlow.js for sentiment analysis, and TensorFlow Lite for digit classification.

As you make your way through the book, you'll build projects in various real-world domains, incorporating natural language processing (NLP), the Gaussian process, autoencoders, recommender systems, and Bayesian neural networks, along with trending areas such as Generative Adversarial Networks (GANs), capsule networks, and reinforcement learning. You'll learn how to use the TensorFlow on Spark API and GPU-accelerated computing with TensorFlow to detect objects, followed by how to train and develop a recurrent neural network (RNN) model to generate book scripts.

By the end of this book, you'll have gained the required expertise to build full-fledged machine learning projects at work.

What you will learn

  • Understand the TensorFlow ecosystem using various datasets and techniques
  • Create recommendation systems for quality product recommendations
  • Build projects using CNNs, NLP, and Bayesian neural networks
  • Play Pac-Man using deep reinforcement learning
  • Deploy scalable TensorFlow-based machine learning systems
  • Generate your own book script using RNNs

Who this book is for

TensorFlow Machine Learning Projects is for you if you are a data analyst, data scientist, machine learning professional, or deep learning enthusiast with basic knowledge of TensorFlow. This book is also for you if you want to build end-to-end projects in the machine learning domain using supervised, unsupervised, and reinforcement learning techniques

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is TensorFlow Machine Learning Projects an online PDF/ePUB?
Yes, you can access TensorFlow Machine Learning Projects by Ankit Jain, Armando Fandango, Amita Kapoor in PDF and/or ePUB format, as well as other popular books in Computer Science & Neural Networks. We have over one million books available in our catalogue for you to explore.

Information

Year
2018
ISBN
9781789132403
Edition
1

Classifying Clothing Images using Capsule Networks

In this chapter, we will learn how to implement capsule networks on the Fashion MNIST dataset. This chapter will cover the inner workings of capsule networks and explain how to implement them in TensorFlow. You will also learn how to evaluate and optimize the model.
We have chosen capsule networks because they have the ability to preserve the spatial relationships of images. Capsule networks were introduced by Geoff Hinton, et al. They published a paper in 2017 that can be found at https://arxiv.org/abs/1710.09829. Capsule networks gained immense popularity within the deep learning community as a new type of neural network.
By the end of this chapter, we will be able to classify clothing using capsule networks after going through the following:
  • Understanding the importance of capsule networks
  • A brief understanding of capsules
  • The routing by agreement algorithm
  • The implementation of the CapsNet architecture for classifying Fashion-MNIST images
  • The limitations of capsule networks

Understanding the importance of capsule networks

Convolutional neural networks (CNNs) form the backbone of all the major breakthroughs in image detection today. CNNs work by detecting the basic features that are present in the lower layers of the network and then proceed to detect the higher level features present in the higher layers of the network. This setup does not contain a pose (translational and rotational) relationship between the lower-level features that make up any complex object.
Imagine trying to identify a face. In this case, just having eyes, nose, and ears in an image can lead a CNN to conclude that it's a face without caring about the relative orientation of the concerned objects. To explain this further, if an image has a nose above the eyes, CNNs still can detect that it's an image. CNNs take care of this problem by using max pooling, which helps increase the field of view for the higher layers. However, this operation is not a perfect solution as we tend to lose valuable information in the image by using it.
As a matter of fact, Hinton himself states the following:
"The pooling operation used in convolutional neural networks is a big mistake and the fact that it works so well is a disaster."
In the paper, Hinton tries to provide an intuition on solving this problem using the inverse graphics approach. For graphics in computers, an image is constructed by using an internal representation of the objects present in the image. This is done using arrays and matrices. This internal representation helps preserve the shape, the orientation, and the object's relative position when compared to all other objects in the image. The software takes this internal representation and publishes the image on the screen using a process known as rendering.
Hinton specifies that the human brain does some sort of inverse graphics. We see an image through our eyes, and then brain our dissects the image and constructs a hierarchical representation of different objects in the image before trying to match them to the existing patterns that we have seen. An interesting observation to note is that humans can identify objects in an image, irrespective of their viewing angle.
He then proceeds to argue that in order to perform classification, it is necessary to preserve the relative orientation and position of different objects in the image (this helps mimic the human capability, as we discussed previously). It's quite intuitive that...

Table of contents