I want to use a pre-trained saved model to continue training on a new dataset with different inputs. So I changed the shape of the kernel weights of the LSTM model (since the kernel weights depend on the input size) so that it fits to the input of the new data.
But when I apply model.layers[2].set_weights([new_weights]) (where new weights includes kernel, recurrent and bias weights), I get the following error:
ValueError: Layer weight shape (2, 5) not compatible with provided weight shape (3, 5)
I guess this is because, the weights used in .set_weights() should be of the same shape like those in .get_weights() but I was wandering if there was a way to change the input dimension of the weights?
Thanks
--
You received this message because you are subscribed to the Google Groups "Keras-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keras-users...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/keras-users/21491c0c-e9b3-4de9-a2da-ee922b102f5dn%40googlegroups.com.