Reputation: 45
I am using Google Colaboratory for training my model through a dataset that I have uploaded to colab.research.google.com
. After completing my training process I want to use the trained parameters in my local PC and create the same model with trained values locally. What procedure should I follow?
Upvotes: 2
Views: 5044
Reputation: 1
maybe the double quotes "/content/gdrive/My Drive/name_of_your_model.h5"
are wrong you need to put single one as "/content/gdrive"
Upvotes: 0
Reputation: 1040
You need to connect your notebook to your google drive by:
from google.colab import drive
drive.mount('/content/gdrive')
then after training, save your trained model as:
model.save("/content/gdrive/My Drive/name_of_your_model.h5")
Open your google drive, download the saved file name_of_your_model.h5. Then on your local pc load the model
from keras.models import load_model
model = load_model(<path to your model file on local machine>)
Now you have the trained model on your local pc
Upvotes: 7