TensorFlow Deep Learning Projects
eBook - ePub

TensorFlow Deep Learning Projects

Alexey Grigorev, Rajalingappaa Shanmugamani, Alberto Boschetti, Luca Massaron, Abhishek Thakur

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

TensorFlow Deep Learning Projects

Alexey Grigorev, Rajalingappaa Shanmugamani, Alberto Boschetti, Luca Massaron, Abhishek Thakur

Book details
Book preview
Table of contents
Citations

About This Book

Leverage the power of Tensorflow to design deep learning systems for a variety of real-world scenarios

Key Features

  • Build efficient deep learning pipelines using the popular Tensorflow framework
  • Train neural networks such as ConvNets, generative models, and LSTMs
  • Includes projects related to Computer Vision, stock prediction, chatbots and more

Book Description

TensorFlow is one of the most popular frameworks used for machine learning and, more recently, deep learning. It provides a fast and efficient framework for training different kinds of deep learning models, with very high accuracy. This book is your guide to master deep learning with TensorFlow with the help of 10 real-world projects.

TensorFlow Deep Learning Projects starts with setting up the right TensorFlow environment for deep learning. Learn to train different types of deep learning models using TensorFlow, including Convolutional Neural Networks, Recurrent Neural Networks, LSTMs, and Generative Adversarial Networks. While doing so, you will build end-to-end deep learning solutions to tackle different real-world problems in image processing, recommendation systems, stock prediction, and building chatbots, to name a few. You will also develop systems that perform machine translation, and use reinforcement learning techniques to play games.

By the end of this book, you will have mastered all the concepts of deep learning and their implementation with TensorFlow, and will be able to build and train your own deep learning models with TensorFlow confidently.

What you will learn

  • Set up the TensorFlow environment for deep learning
  • Construct your own ConvNets for effective image processing
  • Use LSTMs for image caption generation
  • Forecast stock prediction accurately with an LSTM architecture
  • Learn what semantic matching is by detecting duplicate Quora questions
  • Set up an AWS instance with TensorFlow to train GANs
  • Train and set up a chatbot to understand and interpret human input
  • Build an AI capable of playing a video game by itself –and win it!

Who this book is for

This book is for data scientists, machine learning developers as well as deep learning practitioners, who want to build interesting deep learning projects that leverage the power of Tensorflow. Some understanding of machine learning and deep learning, and familiarity with the TensorFlow framework is all you need to get started with this book.

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 Deep Learning Projects an online PDF/ePUB?
Yes, you can access TensorFlow Deep Learning Projects by Alexey Grigorev, Rajalingappaa Shanmugamani, Alberto Boschetti, Luca Massaron, Abhishek Thakur in PDF and/or ePUB format, as well as other popular books in Computer Science & Artificial Intelligence (AI) & Semantics. We have over one million books available in our catalogue for you to explore.

Information

Detecting Duplicate Quora Questions

Quora (www.quora.com) is a community-driven question and answer website where users, either anonymously or publicly, ask and answer questions. In January 2017, Quora first released a public dataset consisting of question pairs, either duplicate or not. A duplicate pair of questions is semantically similar; in other words, two questions being duplicated means that they carry the same meaning, although they use a different set of words to express the exact same intent. For Quora, it is paramount to have a single question page for each distinct question, in order to offer a better service to users consulting its repository of answers, so they won't have to look for any more sources before finding all they need to know. Moderators can be helpful in avoiding duplicated content on the site, but that won't easily scale, given the increasing number of questions answered each day and a growing historical repository. In this case, an automation project based on Natural Language Processing (NLP) and deep learning could be the right solution for the task.
This chapter will deal with understanding how to build a project based on TensorFlow that explicates the semantic similarity between sentences using the Quora dataset. The chapter is based on the work of Abhishek Thakur (https://www.linkedin.com/pulse/duplicate-quora-question-abhishek-thakur/), who originally developed a solution based on the Keras package. The presented techniques can also easily be applied to other problems that deal with semantic similarity. In this project, we will cover the following:
  • Feature engineering on text data
  • TF-IDF and SVD
  • Word2vec and GloVe based features
  • Traditional machine learning models such as logistic regression and gradient boosting using xgboost
  • Deep learning models including LSTM, GRU, and 1D-CNN
By the end of the chapter, you will be able to train your own deep learning model on similar problems. To start with, let's have a quick look at the Quora dataset.

Presenting the dataset

The data, made available for non-commercial purposes (https://www.quora.com/about/tos) in a Kaggle competition (https://www.kaggle.com/c/quora-question-pairs) and on Quora's blog (https://data.quora.com/First-Quora-Dataset-Release-Question-Pairs), consists of 404,351 question pairs with 255,045 negative samples (non-duplicates) and 149,306 positive samples (duplicates). There are approximately 40% positive samples, a slight imbalance that won't need particular corrections. Actually, as reported on the Quora blog, given their original sampling strategy, the number of duplicated examples in the dataset was much higher than the non-duplicated ones. In order to set up a more balanced dataset, the negative examples were upsampled by using pairs of related questions, that is, questions about the same topic that are actually not similar.
Before starting work on this project, you can simply directly download the data, which is about 55 MB, from its Amazon S3 repository at this link: http://qim.ec.quoracdn.net/quora_duplicate_questions.tsv into our working directory.
After loading it, we can start diving directly into the data by picking some example rows and examining them. The following diagram shows an actual snapshot of the few first rows from the dataset:

First few rows of the Quora dataset
Exploring further into the data, we can find some examples of question pairs that mean the same thing, that is, duplicates, as follows:
How does Quora quickly mark questions as needing improvement?
Why does Quora mark my questions
as needing improvement/clarification
before I have time to give it details?
Literally within seconds

Why did Trump win the Presidency? How did Donald Trump win the 2016 Presidential Election?
What practical applications might evolve from the discovery of the Higgs Boson? What are some practical benefits of the discovery of the Higgs Boson?
At first sight, duplicated questions have quite a fe...

Table of contents