Model Compilation and Training in Neural Networks
Model Training Pipeline
Compile
model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy']).
Fit
model.fit(x_train, y_train, epochs=10, validation_split=0.2).
Watch Loss
Training and validation loss should both decrease.
Stop on Plateau
EarlyStopping callback saves time when loss stops improving.
Noble Desktop's Python Machine Learning Bootcamp covers scikit-learn, Keras, neural networks, and applied ML.
This lesson is a preview from our Data Science & AI Certificate Online (includes software) and Python Certification Online (includes software & exam). Enroll in a course for detailed lessons, live instructor support, and project-based training.
We've built our model. Before we actually run it, which we'll do in just a moment, we need to compile it.