Complete the code to save a TensorFlow model in HDF5 format.
model.save('my_model.[1]')
The correct file extension for saving a TensorFlow model in HDF5 format is .h5.
Complete the code to load a TensorFlow model saved in HDF5 format.
loaded_model = tf.keras.models.[1]('my_model.h5')
The function to load a saved Keras model is load_model.
Fix the error in the code to save the model in HDF5 format.
model.save('model[1]')
To save the model in HDF5 format, the filename must end with .h5.
Fill both blanks to create a dictionary comprehension that stores layer names and their weights from a model.
weights_dict = {layer.[1]: layer.[2] for layer in model.layers}Each layer's name is used as the key, and its weights are the values in the dictionary.
Fill all three blanks to create a dictionary comprehension that stores layer names and the count of their weights if the layer has weights.
weights_count = {layer.[1]: len(layer.[2]) for layer in model.layers if layer.[3]The dictionary keys are layer name, the values are the length of weights, and the condition checks if the layer has_weights.