Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
PyTorch Deep Learning Hands-On

You're reading from   PyTorch Deep Learning Hands-On Build CNNs, RNNs, GANs, reinforcement learning, and more, quickly and easily

Arrow left icon
Product type Paperback
Published in Apr 2019
Publisher Packt
ISBN-13 9781788834131
Length 250 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Sherin Thomas Sherin Thomas
Author Profile Icon Sherin Thomas
Sherin Thomas
Sudhanshu Passi Sudhanshu Passi
Author Profile Icon Sudhanshu Passi
Sudhanshu Passi
Arrow right icon
View More author details
Toc

The problem

In this chapter, I will first explain a problem to solve and then explain the concepts, while fixing the problem we have. The problem is finding the similarity between two English sentences with three different approaches. To make the comparison fair, we'll use word embeddings in all the implementations. Don't worry, we'll go through word embeddings as well. The problem in hand is commonly called an entailment problem, where we have two sentences at each instance and our job is to predict the similarity between these sentences. We could classify the sentences into three categories:

  • Entailment: both sentences mean the same thing:
    • A soccer game with multiple males playing.
    • Some men are playing a sport.
  • Neutral: both sentences have something in common:
    • An older and younger man smiling.
    • Two men are smiling and laughing at the cats playing on the floor.
  • Contradiction: both sentences convey two different meanings:
    • A black race car starts up in front of a crowd...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime