Recall & Review
beginner
What is the main purpose of saving a machine learning model?
Saving a model lets you keep the trained model so you can use it later without retraining. It's like saving your work in a game to continue playing later.
Click to reveal answer
beginner
Name two common file formats used to save machine learning models.
Two common formats are:<br>1. Pickle (.pkl) for Python objects<br>2. HDF5 (.h5) often used with Keras models
Click to reveal answer
intermediate
What is the difference between saving a model's architecture and saving its weights?
Saving architecture means saving the model's design (layers and connections). Saving weights means saving the learned numbers inside the model. Both are needed to fully restore the model.
Click to reveal answer
beginner
Why is it important to load a saved model correctly before making predictions?
Loading the model correctly ensures it has the same structure and learned information. Otherwise, predictions might be wrong or cause errors.
Click to reveal answer
intermediate
In TensorFlow/Keras, which function saves the entire model including architecture, weights, and optimizer state?
The function is
model.save('filename'). It saves everything needed to reload and continue training or predicting.Click to reveal answer
What does saving a machine learning model allow you to do?
✗ Incorrect
Saving a model lets you reuse it later without retraining, saving time and resources.
Which file format is commonly used to save Keras models?
✗ Incorrect
Keras models are often saved in HDF5 format with the .h5 extension.
What must you do before using a saved model to make predictions?
✗ Incorrect
You need to load the saved model correctly to use it for predictions.
Which Python library function is used to save a model as a pickle file?
✗ Incorrect
pickle.dump() saves Python objects like models to a file.
What does loading a model restore?
✗ Incorrect
Loading a model restores both its architecture and learned weights.
Explain why saving and loading models is important in machine learning projects.
Think about how you would use a model after training it once.
You got /4 concepts.
Describe the steps to save a trained model and then load it back for making predictions.
Consider the functions or methods you might use in Python or TensorFlow.
You got /3 concepts.