Example 1Lesson 25Free preview
Ex1 Model
This lesson is part of A.I. · All levels
Summary
The model is made with tf.sequential() and then a dense layer is added as needed. For simple regression, just one layer with one neuron, configured with the loss meanSquaredError and the sgd optimizer. Once compiled, the model is ready to be trained with the data that has been prepared.
Key points
- Tf.sequential() compose layers of neural networks in sequence.
- It's suitable for single feature regression.
- 'meanSquaredError' is used for the number regression problem.
- The 'sgd' optimizer performs a stochastic descent gradient to update the weight.
- Model.summary() displays the structure and number of model parameters.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.