Complete the code to load a pre-trained model.
model = load_model('[1]')
Loading pretrained_weights means the model already learned from a large dataset.
Complete the code to fine-tune the model on new data.
model.train(new_data, epochs=[1])Fine-tuning usually involves training for a few epochs like 5 to adjust the model gently.
Fix the error in the code to freeze pre-trained layers before fine-tuning.
for layer in model.layers: layer.[1] = False
Setting trainable = False freezes the layer so it is not updated during fine-tuning.
Fill both blanks to create a fine-tuning loop that updates only unfrozen layers.
for layer in model.layers: if layer.[1] == [2]: update(layer)
We check if trainable == True to update only layers that can learn.
Fill all three blanks to create a dictionary comprehension that stores layer names and their trainable status.
layer_status = {layer.[1]: layer.[2] for layer in model.[3]This code creates a dictionary with layer names as keys and their trainable status as values from the model's layers.