Placeholder Image

Subtitles section Play video

  • [MUSIC PLAYING]

  • JOSH GORDAN: OK, so we have a bunch of cool topics,

  • and we'll definitely hit the Getting Started

  • resources in a moment, but because we

  • talk about mnist a lot, and very basic problems

  • in computer vision a lot, I wanted to actually start

  • the talk by sharing a couple of my favorite recent examples,

  • all of which have complete code in TensorFlow 2.0.

  • So even if you're new to TensorFlow,

  • and these concepts can take a long time to learn--

  • like to talk about neural machine translation,

  • you would need to take a class--

  • you can still try the code.

  • And most of them are 50 lines or less.

  • And they run very quickly.

  • So anyway, they're great.

  • Anyway, TensorFlow 2.0 is currently in alpha.

  • It is all about ease of use, which is the number one

  • thing I care about.

  • And it's ease of use at all levels.

  • So both for novices that are totally starting out,

  • as well as PhD students that want

  • to be able to do their research in a slightly easier way.

  • I'm not going to spend too much time on this slide.

  • I just wanted to call out the most important thing

  • about TensorFlow is the user and the contributor community.

  • And as of now we've had over 1,800 people

  • contribute code to the code base,

  • which is huge if you think about how many seats that would

  • fill up here.

  • So thank you very much to everyone who has contributed,

  • and the many more who have done docs

  • and have done teaching and meetups and stuff like that.

  • So it's super cool.

  • Anyway, the alpha of TensorFlow 2 is available today.

  • Also going to fly through this slide.

  • And what you should know is, every single example linked

  • from the following slides will automatically

  • install the correct version of TensorFlow at the very top.

  • And they'll all run in Colaboratory, which is the best

  • thing since the microwave.

  • And if you run it in Colab, there's

  • nothing to install on your local machine.

  • So if you want to try out the latest version of TensorFlow

  • 2.0, you literally can follow these links

  • and with a single click you'll be in Colab

  • and you're good to go.

  • So before we get into Hello World,

  • I wanted to very quickly talk about things like Deep Dream.

  • So what deep learning is, is really representation learning.

  • And we don't have as much time as I'd

  • like to go into that in great detail.

  • But there's been a couple pieces of really amazing work

  • in the last few years.

  • And on the left we're seeing a psychedelic image generated

  • by a program called Deep Dream.

  • And what's really interesting, I just

  • wanted to say that the goal of Deep Dream

  • was not to generate psychedelic images.

  • It was to investigate how convolutional neural networks

  • are so effective at classifying images.

  • And it was discovered that every neuron in every layer of a CNN

  • learns to detect different features when you train it

  • on a large corpus of training data.

  • And you can use TensorFlow to write a loss function

  • to try and maximally excite one of those neurons.

  • So anyway, the TLDR is, the fact that we can take an image

  • and supersaturate it with dogs is

  • possible as an artifact of training a CNN

  • on a large database of images.

  • Anyway, there's a notebook there where you can try it out.

  • It runs very quickly in Colab.

  • And like less than 50 lines of code.

  • It's surprisingly short.

  • Once you know the idea, the implementation in TensorFlow 2

  • is super easy.

  • On the right is an example called

  • Style Transfer, which I'm going to fly through.

  • But it comes from exactly the same idea.

  • It's given that we've trained an image classifier

  • on a very large amount of data.

  • What else can we do with it?

  • And it exploits very similar ideas, Deep Dream.

  • Another really, really cool example

  • that I wanted to share with you is for something

  • called neural machine translation.

  • And this is like 50 lines of code,

  • give or take, that out of the box

  • will train you an English to Spanish translator.

  • And the only input you need to provide-- this

  • is totally open source.

  • We're not hitting the Google Translate API.

  • The reason I like this example, it's

  • all the code you need to implement a mini version

  • of Google Translate.

  • The simplest possible Hello World version

  • of Google Translate can be done in 50 lines.

  • And the one thing I wanted to mention very briefly

  • is I'm a little bit envious of people that

  • are bilingual and trilingual.

  • I have English and barely high school Spanish.

  • And so translation has always interested in me.

  • And the way that the translation example works,

  • it uses something called a sequence to sequence model.

  • Briefly, what that does is it takes a sentence in English

  • or the source language, and it maps it down

  • to a vector, which you can actually see and print out

  • in the code and explore.

  • And that vector is just an array of numbers.

  • That's called an encoder.

  • There's a second neural network--

  • it's two natural networks working parallel--

  • there's a second network called a decoder.

  • The only input to the decoder is that vector,

  • and the decoder produces a sentence

  • in the target language.

  • And what this means is that the encoder takes a sentence

  • and it compresses it.

  • So before, we saw that deep learning can

  • be seen as representation learning

  • because as an artifact of training

  • a network on a large corpus of images

  • to train an image classifier, we find neurons

  • that learn to recognize different shapes and objects

  • and textures.

  • And here we can think about deep learning

  • as compression, because we can take a sentence which

  • contains a huge amount of information and map it down

  • to a short list of numbers.

  • And the reason I wanted to mention this trilingual aspect

  • is you can actually come up with something called

  • an interlingual representation, just by modifying this example.

  • Say we wanted to translate from English to Spanish and also

  • from French to Spanish.

  • Just by modifying this code to include

  • a small number of French to Spanish sentences in the input

  • data that you provide, that vector

  • that comes out of the encoder will encode a sentence

  • either in English or in French into the same representation.

  • And what that means is, you're finding a way

  • to represent concepts independently of language.

  • And I know this is a little bit out of scope

  • for Hello TensorFlow World, which we'll get to in a sec.

  • But the reason I want to mention things like this

  • is there's incredible opportunities

  • at the intersection of deep learning and other fields.

  • So for example, if you were a linguist,

  • perhaps you're not super interested

  • in the details of the TensorFlow implementation,

  • but what you could do is look at this interlingual

  • representation that we get almost for free,

  • and investigate it.

  • And right there, that would be a killer PhD paper or thesis

  • or something like that.

  • And so when we put these fields together,

  • we get super, super cool things.

  • I'm taking way too long.

  • I'm going to skip this entirely.

  • I just wanted to mention we can also take an image

  • and using the same encoder decoder architecture,

  • map the image into a vector and reusing the decoder, which

  • maps from vectors to sentences that we have in the translation

  • tutorial, almost copying and pasting it,

  • we can learn to caption an image.

  • And this tutorial has a little bit more code,

  • but it's the same idea.

  • It's absolutely mind-blowing.

  • So there's a lot of value in learning about deep learning,

  • and it has a lot of potential impact.

  • Also we have two really excellent resources

  • for total beginners.

  • The first is linear regression, finding the best fit

  • line, which is probably the most boring thing ever,

  • but it