Search icon CANCEL
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Machine Learning with Go Quick Start Guide

You're reading from  Machine Learning with Go Quick Start Guide

Product type Book
Published in May 2019
Publisher Packt
ISBN-13 9781838550356
Pages 168 pages
Edition 1st Edition
Languages
Authors (2):
Michael Bironneau Michael Bironneau
Profile icon Michael Bironneau
Toby Coleman Toby Coleman
Profile icon Toby Coleman
View More author details

How to restore a saved GoML model

Once you have put the hard work into creating a ML model, you may need to shut down your computer. What happens to your model when the computer is restarted? Unless you have persisted it to disk, it will disappear and you will need to start the training process again. Even if you have saved the model hyperparameters in a gophernotes notebook, the model itself will not have been saved. And if the training process is a long one, you may need to wait a long time before your model is ready to use again.

In the following example, we will explain how to restore the model we created in Chapter 3, Supervised Learning, and persist it to the local filesystem in a model.dat file using its PersistToFile method, which is provided by the GoML API. We will restore it using its RestoreFromFile method. We will assume that all the other funcs we created in Chapter...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime}