I'm having a trouble with loading model weights in (tf.)Keras.
My model is just a simple LSTM model with a pre-trained word embedding, but I left the word embedding to be trainable while training.
I saved model weights with the following code:
mc = ModelCheckpoint(filepath, save_weights_only=True, monitor='val_accuracy', mode='max', verbose=1, save_best_only=True)
I checked that there exists the hdf5 file at the filepath, with a size of around 18MB.
Later, I tried to load the weights with the following code:
model = build_model() #the function that I used to make the model in Training process
model = model.load_weights(filepath)
However, model.load_weights(filepath) returns None
Question1. Is there any problem with these codes? If not is this possibly because I left the word embedding to be trainable?
Question2. = In this case, where is the modified word embedding saved? Is it saved with other parameters in the hdf5 file? If this is the case how can I load this fine-tuned word embedding?