Text Classification Using BERT & Tensorflow | Deep Learning Tutorial 47 (Tensorflow, Keras & Python)

codebasics
28 Aug 202129:14

Summary

TLDRThis video builds on the previous explanation of BERT by demonstrating how to use it for email classification, determining whether emails are spam or non-spam. The presenter walks through key steps, including generating embedding vectors from email text using BERT and feeding them into a simple neural network. The model is trained and evaluated, achieving high accuracy. The tutorial also touches on handling data imbalances, building functional models in TensorFlow, and using cosine similarity to compare word embeddings. Viewers are encouraged to practice by running similar code on their own.

Takeaways

  • 😀 The video explains how BERT, a language model, can be used for email classification to determine if an email is spam or not.
  • 🔍 BERT converts an entire email into an embedding vector, which is a numerical representation that captures the context of the text.
  • 📊 The video demonstrates creating a neural network with a single dense layer and a dropout layer to prevent overfitting, using the embeddings as input.
  • 📈 The script discusses the importance of data preprocessing, including creating a new column for the target variable and performing a train-test split while maintaining class balance.
  • 🌐 The tutorial guides viewers on how to access and use BERT models from TensorFlow Hub for pre-processing and encoding text.
  • 💻 The presenter shows how to generate embedding vectors for sentences and words using BERT, and even compares the vectors using cosine similarity.
  • 📝 The video introduces functional models in TensorFlow, contrasting them with sequential models, and demonstrates building a functional model for the classification task.
  • 🎯 The training process involves compiling the model with an optimizer and loss function, then fitting it to the training data.
  • 📊 The script includes an evaluation of the model's performance on a test set, achieving high accuracy for both training and testing.
  • 🔧 The video concludes with an exercise for viewers to practice what they've learned by following a TensorFlow tutorial on text classification with BERT.

Q & A

  • What is the main purpose of using BERT in the provided email classification example?

    -The main purpose of using BERT in this example is to convert the entire email into an embedding vector, which can then be fed into a neural network for training to classify emails as spam or non-spam.

  • Why is the embedding vector from BERT set to a length of 768?

    -The embedding vector from BERT is set to a length of 768 because this is the standard dimensionality of the hidden layers in the BERT model, which was covered in a previous video as mentioned by the speaker.

  • What are the two main components of the BERT model?

    -The two main components of the BERT model are preprocessing and encoding. Preprocessing prepares the text for the model, while encoding generates the sentence embeddings.

  • How does the speaker handle the imbalance in the dataset between ham and spam emails?

    -The speaker first checks for class imbalance by grouping the data and observing the distribution of spam and ham emails. To ensure balance during model training, the speaker uses stratification during the train-test split, ensuring proportional representation of both classes.

  • What is the purpose of the ‘apply’ function in creating the 'spam' column in the data frame?

    -The 'apply' function is used to create a new column 'spam' by applying a lambda function that assigns 1 if the email is spam and 0 if it is ham, using a ternary operator in Python.

  • Why does the speaker use a dropout layer in the neural network model?

    -A dropout layer is used to tackle overfitting by randomly dropping a fraction of the neurons during training. In this case, the speaker drops 10% of the neurons to improve generalization.

  • What does the speaker mean by 'pooled output' in BERT encoding?

    -The 'pooled output' in BERT refers to the embedding vector for the entire sentence, which is generated after encoding and represents the meaning of the full sentence.

  • How does the speaker evaluate the model's performance?

    -The speaker evaluates the model's performance by splitting the dataset into training and test sets, then training the model for 5 epochs. After training, the speaker achieves a 95% accuracy on the test set.

  • What is cosine similarity, and how is it used in the video?

    -Cosine similarity is a metric used to measure the similarity between two vectors. In the video, the speaker uses cosine similarity to compare the embedding vectors of different words (e.g., comparing fruits like 'banana' and 'grapes' and people like 'Jeff Bezos').

  • What exercise does the speaker recommend for the viewers?

    -The speaker recommends that viewers follow a TensorFlow tutorial on classifying text with BERT. The exercise involves copying and running code from the tutorial to practice and solidify the concepts learned in the video.

Outlines

00:00

📧 Introduction to Email Classification with BERT

This paragraph introduces the concept of using BERT (Bidirectional Encoder Representations from Transformers) for email classification, distinguishing spam from non-spam emails. The author explains how BERT converts an entire email into an embedding vector, which is then fed into a simple neural network with a single dense layer for training. The network also uses a dropout layer to prevent overfitting. The paragraph discusses the steps involved in preprocessing the dataset, including handling data imbalance and creating a new column to indicate spam status.

05:00

🔗 Setting Up BERT for Text Encoding

This paragraph outlines the steps required to set up BERT for text encoding using TensorFlow Hub. It describes how to access and utilize the BERT pre-processing and encoding components from the TensorFlow Hub website. The author provides instructions on copying the required URLs for BERT pre-processing and encoding, and integrating them into a Keras layer. The paragraph also emphasizes the time it may take to download the pre-trained BERT model and the use of the model to generate embedding vectors for different sentences.

10:02

🤖 Building a Functional Neural Network Model with BERT

This section details the process of building a functional neural network model using BERT for text classification. The author explains the difference between sequential and functional models in TensorFlow and introduces a method to create a functional model that can handle multiple inputs and outputs. The steps include defining an input layer, processing the input through BERT encoding, adding a dropout layer to prevent overfitting, and finally adding a dense layer with a sigmoid activation function for binary classification. The author also provides insights into the trainable and non-trainable parameters of the model and discusses the use of binary cross-entropy as a loss function.

15:03

🎯 Training and Evaluating the Model

This paragraph focuses on the training and evaluation process of the neural network model built using BERT. The author explains how to compile the model using standard parameters like optimizer and loss functions, and then trains it using the training dataset. The training is conducted over a set number of epochs, and the author discusses the time it might take depending on the system's computing power. The model achieves an accuracy of 93% on the training data and 95% on the test data. The author also demonstrates how to perform inference on new emails using the trained model and provides examples of the model's predictions for spam detection.

Mindmap

Keywords

💡BERT

BERT (Bidirectional Encoder Representations from Transformers) is a language representation model that Google introduced in 2018. It's designed to pre-process and encode text into a format that can be used by machine learning models. In the video, BERT is used to convert emails into embedding vectors, which are then fed into a neural network for classification as spam or non-spam. The script mentions that BERT generates a vector of 768 length, highlighting its role in creating dense representations of text data.

💡Embedding Vector

An embedding vector is a numerical representation of text data that captures semantic meaning. In the context of the video, BERT converts an entire email into a single vector, which is then used for further processing by machine learning algorithms. The script explains that this vector is crucial for training the neural network to classify emails, as it represents the email's content in a format that can be mathematically manipulated.

💡Neural Network

A neural network is a series of algorithms modeled loosely after the human brain that are designed to recognize patterns. In the video, a simple neural network with one dense layer is used to classify emails based on the embedding vectors generated by BERT. The script describes how this network is trained to distinguish between spam and non-spam emails, illustrating the application of neural networks in text classification tasks.

💡Dense Layer

In neural networks, a dense layer is a layer where each neuron is connected to all the neurons in the previous layer. The video script mentions a dense layer with one neuron as the output layer for the email classification model. This layer is crucial for making the final prediction, as it aggregates the information from the previous layers and outputs a single value that represents the classification result.

💡Dropout Layer

A dropout layer is a regularization technique used to prevent overfitting in neural networks. By randomly 'dropping out' a subset of neurons during training, it helps to ensure that the network does not rely too heavily on any one feature. In the script, a dropout layer is included in the neural network to tackle overfitting, which is a common issue when training models on imbalanced datasets.

💡Pre-processing

Pre-processing is the initial step of data preparation that includes cleaning and organizing data before it is used for modeling. In the video, BERT's pre-processing component is used to convert raw email text into a format that can be encoded by the BERT model. The script emphasizes the importance of this step, as it ensures that the input data is in the correct form for the BERT encoder to process.

💡Encoding

Encoding in the context of BERT refers to the process of converting pre-processed text into a numerical format that represents the text's semantic meaning. The script describes how BERT's encoder takes the pre-processed text and generates an embedding vector, which is then used as input to the neural network for classification.

💡Spam Classification

Spam classification is the task of automatically categorizing emails as either spam or non-spam (ham). The video script details a project where BERT is used to classify emails, with the model trained to distinguish between spam and legitimate emails. This is an example of a binary classification problem, where the output is one of two categories.

💡Imbalanced Dataset

An imbalanced dataset is one where the number of instances of the different classes is not equal. In the video, the script mentions an imbalance in the dataset, with more ham emails than spam. The speaker addresses this issue by using stratification during the train-test split to ensure that the model is trained on a balanced representation of both classes.

💡Cosine Similarity

Cosine similarity is a measure used to determine how similar two non-zero vectors are. In the video, the script includes an example where cosine similarity is used to compare embedding vectors of different words to understand the semantic relationships between them. This concept is used to illustrate how BERT can capture the meaning of words and phrases.

💡Functional Model

A functional model in TensorFlow is a way to create more complex models, such as those with multiple inputs or outputs, or models that share layers. The video script contrasts functional models with sequential models, explaining that functional models allow for greater flexibility in model architecture. The speaker uses a functional model to build the email classification system, demonstrating an alternative approach to model building.

Highlights

BERT is used for email classification to determine if an email is spam or not.

BERT converts an entire email into an embedding vector.

The embedding vector generated by BERT is 768 in length.

A simple neural network with one dense layer is used for training after BERT encoding.

A dropout layer is included to prevent overfitting.

BERT consists of two components: pre-processing and encoding.

The BERT model is downloaded from TensorFlow Hub.

The dataset used is from Kaggle, with two columns: category and email content.

Data imbalance is noted, with more 'ham' emails than 'spam'.

A new column 'spam' is created to label emails as 1 for spam and 0 for ham.

A train-test split is performed with 80% for training and 20% for testing.

Stratification is used in the train-test split to maintain balance.

The BERT model is used to generate embedding vectors for sentences.

Cosine similarity is used to compare embedding vectors.

Functional models in TensorFlow are introduced as an alternative to sequential models.

The model architecture includes an input layer, BERT encoder, dropout layer, and a dense output layer.

The model is compiled with binary cross-entropy loss due to binary classification.

The model achieves 93% accuracy on training and 95% on testing.

Inference is performed on new emails to classify them as spam or not spam.

BERT can be applied to various text classification problems beyond email classification.

An exercise is provided for viewers to practice using BERT with a larger dataset.

Transcripts

play00:00

I hope you have seen my previous video

play00:02

on what is BERT in this video explain

play00:04

how BERT works

play00:05

the fundamentals of it in today's video

play00:08

we are going to

play00:10

do email classification whether it's a

play00:12

spam or non-spam using BERT

play00:14

now BERT will convert an email

play00:18

sentence you know the the whole email

play00:20

into

play00:21

an embedding vector. So we saw in a

play00:23

previous video that

play00:25

the purpose of BERT is to generate

play00:28

if is embedding vector for the entire

play00:31

sentence

play00:32

and that is something that we can feed

play00:34

into our neural network and do the

play00:35

training.

play00:36

So here we will generate a vector of 768

play00:40

length y 768 we have covered that in a

play00:42

previous video

play00:43

and then we will supply that to

play00:47

a very simple neural network with only

play00:49

one dense

play00:51

layer, one neuron in the dense layer

play00:54

as an output will also put a dropout

play00:58

layer

play00:58

in between just to tackle the

play01:00

overfitting.

play01:02

Now if you open this BERT box by the way

play01:04

it has two components

play01:06

pre-processing and encoding and we

play01:08

talked about that in a previous video as

play01:09

well so previous video watching that

play01:11

is quite a prerequisite so let's jump

play01:14

into

play01:15

coding. Now here I have downloaded

play01:18

this file from kegel

play01:19

simple two columns category hammer spam

play01:24

and here is the content of your email I

play01:26

have imported few basic

play01:28

libraries here in my jupyter notebook

play01:32

and I'm going to simply read this CSV

play01:35

file into my Pandas data frame which

play01:37

looks like that

play01:39

and then I will do some basic analysis

play01:42

you know I will do df

play01:43

group by let's say category

play01:51

so here I have four eight two five ham

play01:54

emails and 747

play01:56

spam emails you can clearly see

play02:00

there is some imbalance in our data set

play02:04

so we need to take care of that but

play02:06

before we do that

play02:08

we will create a new column in my

play02:11

data frame

play02:12

you know we'll call it spam so let's

play02:15

create a new column

play02:16

and if the value spam the value of

play02:20

this spam column will be 1 ham it will

play02:22

be 0

play02:24

and you all know if you want to create a

play02:27

new column in a data frame from an

play02:28

existing column.

play02:30

You can use apply function and that will

play02:33

take

play02:34

lambda and what we you are doing is if x

play02:37

is equal to spam then the value is one

play02:42

you see this is how ternary operator in

play02:44

python works

play02:45

else value is zero.

play02:48

And now if you do df dot head see we

play02:50

simply create a new

play02:52

column zero one say spam one

play02:55

hem zero all right so far

play02:58

so good now let's do train test split.

play03:02

So I'm going to use our standard

play03:05

sql entry in this split function and in

play03:08

that

play03:11

my x is actually a message

play03:16

and my y is the spam

play03:20

okay the spam column and I'm going to

play03:23

store the output into

play03:26

these variables this is pretty much a

play03:28

standard practice

play03:29

in machine learning world and okay I

play03:32

will do

play03:34

our test size to be

play03:37

point two so eighty percent training

play03:39

samples

play03:40

twenty percent taste sample

play03:45

let let me check how it split the

play03:49

spam and non-spam

play03:53

so value counts

play03:58

okay

play04:01

so I'm checking this to make sure there

play04:03

is a balance

play04:04

okay so let's see okay 149

play04:09

divided by 967 okay around 15 percent

play04:12

spam in test

play04:14

and 3859

play04:19

okay so it is good balance but still

play04:23

to be on a safe side I will

play04:26

say stratify so when you do stratify it

play04:29

will make sure

play04:30

there is a balance you know

play04:34

it's not like in your training data set

play04:36

if all the samples are zero

play04:38

and there are lesser two samples which

play04:40

has spam value

play04:42

then model will not be good in terms of

play04:44

detecting the spam.

play04:46

Okay so that's why I supply this

play04:48

stratify I mean before stratify also it

play04:50

already did a good job

play04:51

but this is just to be on a safe side

play04:55

now comes the most interesting part

play04:57

which is creating the embedding using

play05:00

BERT.

play05:00

Okay so how do you do that so for that

play05:03

you have to go to this tensorflow hub

play05:05

website

play05:06

and click on text and go to BERT model

play05:10

now in but we are going to use this

play05:12

first model so we saw in a previous

play05:14

video that

play05:15

there is an encoder and there is

play05:16

pre-processing step so first you do

play05:18

pre-processing

play05:19

so you click here you copy the URL

play05:23

okay so this is my pre-process URL all

play05:25

right

play05:26

and you go back

play05:30

you go to text bird and

play05:33

you go here and copy this URL. This is

play05:36

your

play05:37

main encoder okay so this is your

play05:40

pre-processing URL

play05:42

and this is your main encoder

play05:46

URL so I'm going to use

play05:49

keras layer hub keras layer basically

play05:52

okay and call that bird pre-process

play05:58

and then I will use the same hope keras

play06:01

layer here

play06:08

and call it BERT encoder

play06:11

see we saw in a presentation there are

play06:13

two steps invert encoding pre-processing

play06:15

and encoding so that's what

play06:16

we did exactly.

play06:21

Okay when you run it it's gonna take

play06:24

some time because

play06:25

it is downloading the BERT model you

play06:28

know it's

play06:29

somewhat around 300 megabytes so based

play06:31

on your internet speed it might take

play06:33

some time

play06:34

but essentially you are downloading a

play06:37

train

play06:37

model which is trained on all the

play06:40

wikipedia

play06:41

and book corpus so now in our task

play06:44

we'll be just directly using that train

play06:47

model to generate the embedding vectors

play06:50

after model is downloaded I am going to

play06:52

define a simple function

play06:54

that takes couple of

play06:58

sentences as an input and returns me an

play07:01

embedding vector so basically the way

play07:03

I'll use this function is okay

play07:05

supply an array of sentences

play07:09

and any sentence okay and that should

play07:12

return me the embedding

play07:14

vector for the entire sentence

play07:17

and if you've seen again my previous

play07:19

video

play07:20

this pre-process handle that you get you

play07:22

can use it as a normal function

play07:24

and you supply your sentences here and

play07:27

it should return you the pre-process

play07:29

text so I will just call it pre-process

play07:32

text and then

play07:41

use the BERT encoder okay and when you

play07:43

use the about encoder it returns a

play07:45

dictionary out of which

play07:47

you need to use pulled out pull output

play07:50

is basically

play07:51

the encoding for the entire sentence

play07:54

again if you want to know

play07:55

what other elements are there in the

play07:57

dictionary you need to watch my previous

play07:58

video it's sort of like a prerequisite

play08:01

all right now see when I run this

play08:04

it is generating for this sentence this

play08:07

is my

play08:08

embedding vector the size is 768

play08:11

for this second sentence this is my

play08:13

embedding vector so

play08:14

we have achieved the major goal here

play08:17

which is

play08:18

generating the vector you know vector

play08:21

using the BERT and I just give you a

play08:24

simple function but in reality

play08:27

we will be using tensorflow layers

play08:30

okay but before we go there let me

play08:32

generate some embedding vectors so

play08:34

for some more you know words let's just

play08:38

generate it for words let's say banana I

play08:41

want to

play08:43

see what kind of embedding vectors it

play08:46

generates

play08:46

for a couple of fruits and then

play08:50

you know what I will compare the fruits

play08:52

with Jeff Bezos and Bill Gates

play08:54

so these three are people these three

play08:56

are fruits so

play08:57

let's see what kind of embedding vector

play08:59

it generates

play09:01

and now I have all these embedding

play09:03

vectors right so if you do e

play09:05

6 by 7 68 okay i am going to use

play09:09

cosine similarity so if you have seen my

play09:12

cosine similarity video

play09:15

if you do cosine similarity you will

play09:17

find this video where I have explained

play09:19

you know what is exactly cosine

play09:21

similarity

play09:23

so if you don't know watch it. It is used

play09:26

to compare

play09:26

two vectors so here i will compare

play09:30

let's say banana banana's embedding

play09:32

vector

play09:33

with uh grapes embedding vector now

play09:37

this takes a two dimensional array so

play09:39

I'm just going to wrap it up in a

play09:41

two dimensional array okay you see 0.99

play09:45

so if it is near to 1 it means

play09:47

these two vectors are very similar so

play09:50

banana and grapes are similar because

play09:51

they are fruits banana and

play09:55

mango is also similar because they are

play09:56

fruit but let me compare banana with

play09:59

Jeff Bzos it's kind of weird right

play10:02

comparing banana with Jeff Bezos

play10:04

see 0.84 but still they're not 0.99

play10:07

they're not as similar as banana and

play10:08

grapes

play10:09

okay and by the way you have to use this

play10:12

with a

play10:13

with a little caution I mean cosine

play10:16

similarity

play10:17

is not exact vector similarity okay so

play10:20

sometimes you might see some unexpected

play10:22

result but that's okay

play10:24

now let me compare Jeff Bezos with Elon

play10:27

Musk

play10:29

say again 0.98 so you get the point

play10:32

behind

play10:33

BERT now okay now let's build a model

play10:38

so far in our deep learning series we

play10:41

have

play10:41

built tensorflow models using sequential

play10:45

model okay we are going to now use

play10:49

functional models so there are two type

play10:50

of model sequential

play10:53

and functional

play10:56

okay so what is the difference between

play10:59

the two?

play11:00

I'm going to link a good article here so

play11:04

in the sequential model you add layers

play11:07

one by one as a sequence you see

play11:10

but in a functional model you create

play11:12

your input

play11:13

then you create a hidden layer let's say

play11:15

and supply input as a

play11:17

function argument then you create hidden

play11:19

one then you supply that into

play11:21

hidden two's argument and so on and then

play11:24

you create model using

play11:25

inputs and outputs now this allows you

play11:27

to

play11:29

create a model which might have multiple

play11:31

inputs multiple outputs

play11:34

like something like rest net you know

play11:36

you can also

play11:37

share network layers with other

play11:41

other models so there are there are some

play11:43

differences you read the article you

play11:45

will get an idea

play11:47

so here I'm going to build a

play11:51

functional model okay

play11:55

so the first step is you create your

play11:58

input layer

play11:59

the shape is going to be this because

play12:02

the sentence length is

play12:03

varying and

play12:06

my data type is string and

play12:10

name of this layer I will call it text

play12:12

or

play12:13

input whatever you know you can give it

play12:16

the name that you like the most and this

play12:18

will be my input layer

play12:21

then we are going to do this

play12:24

these two things

play12:28

so here I supply input okay

play12:32

same thing and then

play12:35

BERT encoder and BERT encoder

play12:39

takes let me just do output here

play12:42

so outputs

play12:46

okay and from the outputs I get pulled

play12:48

output so pull output will be

play12:50

the sentence encoding so pool output

play12:53

will be this

play12:55

okay this I need to

play12:58

I will create one dropout layer which I

play13:00

have not shown in the picture

play13:01

so let me feed that pulled output into a

play13:05

dropout layer

play13:06

and then last layer will be one neuron

play13:08

dense layer okay

play13:10

so let's create dropout layer here

play13:13

dropout layer is used to tackle

play13:17

the overfitting

play13:20

sometimes even if you don't do it it's

play13:22

okay it helps

play13:24

and in that dropout layer

play13:27

you pass this as an input okay so now

play13:31

i'm going to drop 10 of neuron

play13:34

okay and I will call it this

play13:38

dropout and let's call it

play13:42

l l is the layer and the second one

play13:45

is the dense layer with one neuron

play13:48

and since it's a binary classification

play13:51

you know like one zero

play13:52

kind of thing I will do

play13:57

sigmoid and the name of this layer is

play14:01

output and again we are using functional

play14:04

API so

play14:05

you need to treat this as like a

play14:07

function and pass in the previous layer

play14:09

here

play14:11

and then I will say overwrite the same

play14:13

variable you know

play14:15

okay and then in the end my model

play14:19

is nothing but this model

play14:23

which has two parameters inputs

play14:28

outputs now the inputs will be

play14:32

this so it's an array you can supply

play14:34

multiple inputs as well

play14:36

so here this is the input

play14:39

and output will be l okay

play14:43

and you can do model dot summary

play14:50

okay output is not defined

play14:55

so output

play14:59

outputs great

play15:02

now here my trainable parameters are 769

play15:05

because

play15:06

I have 768 neuron here and this one so

play15:09

total

play15:10

769 my non-trainable parameters are so

play15:14

much so these are

play15:16

the parameters from my birth model bird

play15:18

is already trained

play15:20

so I don't need to train them again and

play15:23

when you are doing you know model

play15:25

building you know that you do model

play15:27

compile

play15:27

where optimizer loss these are like

play15:29

pretty much standard

play15:31

things that we use in all our tutorials

play15:34

loss is binary cross entropy because we

play15:36

are doing binary classification here

play15:38

and then I'm going to now run the

play15:41

training so model dot fit

play15:44

x train y train

play15:48

epochs let's do tan epochs now

play15:51

this is gonna take time because the

play15:53

whole encoding process is little slow

play15:55

and we have so many samples so based on

play15:58

your computer it might take time I have

play16:00

a powerful

play16:00

computer and gpu but still takes few

play16:02

minutes so you to be little passion

play16:05

you can reduce epochs if you want okay

play16:10

so I reduced epochs to five and I got

play16:13

ninety three percent accuracy

play16:14

then I do model dot evaluate on my extra

play16:17

sweaters

play16:18

I got ninety five percent accuracy which

play16:20

is which is so

play16:22

good actually so now I do inference so I

play16:24

have a couple of

play16:26

emails actually it's not reviews it's

play16:29

emails

play16:30

and on that email when I do predict

play16:33

see the first three emails are spam

play16:38

the second the rest of them are not spam

play16:40

they're legit emails

play16:42

and in sigmoid whenever the value is

play16:45

more than 0.5 it means it's a spam

play16:48

and it is less than 0.5 it means it's

play16:51

not a spam. So you see

play16:52

so these things worked out really well

play16:55

for us

play16:56

all right so this tutorial provided you

play16:59

a very

play17:00

like a simple explanation of how you can

play17:03

do

play17:05

text classification using BERT you can

play17:08

use

play17:08

BERT for variety of other problems as

play17:11

well just

play17:12

such as movie review classification or

play17:16

name entity recognization and by the way

play17:19

I have an exercise for you and the

play17:22

exercise is actually

play17:23

very simple you have to just do copy

play17:25

paste so

play17:26

go to Google red tensorflow tutorial

play17:29

and in that go to text tutorial and look

play17:33

at classified text with

play17:34

BERT so what you need to do is

play17:37

you need to just run this code on your

play17:39

computer so just

play17:41

copy paste these these lines you know

play17:44

step by step in your notebook and

play17:46

just run it and try to understand it

play17:49

this

play17:50

tutorial is similar to what we did but

play17:53

the

play17:53

data set is much bigger they are using

play17:56

tensorflow data set API so

play17:58

in terms of API also they are using

play18:00

little different we use Pandas

play18:02

and they are also using some caching

play18:05

the model is also little different so if

play18:07

you practice this

play18:09

you will consolidate your learning

play18:12

from this particular video so I hope

play18:14

you're you're going to practices I trust

play18:16

you all you're a census student

play18:18

so please open a notebook copy

play18:21

paste these lines one by one try to

play18:23

understand it

play18:24

and see how it works if you are

play18:26

confident

play18:28

you can just load the data set and

play18:31

finish rest of the tutorials by

play18:32

referring to this page

play18:34

but without referring to this page okay

play18:36

so thank you very much for watching

play18:38

I will see you in the next video if you

play18:40

like this particular video

play18:42

give it a thumbs up and share it with

play18:43

your friends.

Rate This

5.0 / 5 (0 votes)

Étiquettes Connexes
BERT tutorialemail classificationmachine learningspam detectionneural networksTensorFlowdata sciencedeep learningembedding vectorstext analysis
Besoin d'un résumé en anglais ?