Tensorflow2.0 entry and practical study notes (7)-tf.keras sequence problem

table of Contents

1 Data processing:

1.1 Processing into a text vector

1.2 Experimental results:

1.3 Solve the problem of overfitting:


1 Data processing:

Selected data = keras.datasets.imdb movie review data---a two-classification problem

1.1 Processing into a text vector

note:

Processing data into text vectors is convenient for our machine learning, similar to one-hot, K-hot is used here

 

1.2 Experimental results:

As shown in the figure, overfitting

1.3 Solve the problem of overfitting:

  • dropout
  •  L1, L2 regularization

data processing


to be continued--

In fact, this part will always be contacted in the following chapters, so you only need to read your own code to review it.

Guess you like

Origin blog.csdn.net/qq_37457202/article/details/107908126