I followed the following tutorial in Google Colab to create a text generating RNN: https://www.tensorflow.org/tutorials/sequences/text_generation Then, I trained it with my own data. At the end, I also added the following code to save it to my Google Drive as a .h5 file, and it created a file in my drive.
model.save('my_model.h5')
uploaded = drive.CreateFile({'title': 'FILE NAME HERE.h5'})
uploaded.SetContentFile('my_model.h5')
uploaded.Upload()
print('Uploaded file with ID {}'.format(uploaded.get('id')))
Then, I opened a new notebook and tried to load it like so:
downloaded = drive.CreateFile({'id': "FILE ID HERE"})
downloaded.GetContentFile('my_model.h5')
new_model = keras.models.load_model(downloaded)
new_model.summary()
However, it gives me the error, among others: "'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte"
I already tried following other articles that demonstrate how to achieve my goal, and this is what I got.
I would like to be able to continue training the model, without the original code if possible. How do I do that?