Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Machine Learning with Go Quick Start Guide

You're reading from   Machine Learning with Go Quick Start Guide Hands-on techniques for building supervised and unsupervised machine learning workflows

Arrow left icon
Product type Paperback
Published in May 2019
Publisher Packt
ISBN-13 9781838550356
Length 168 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Michael Bironneau Michael Bironneau
Author Profile Icon Michael Bironneau
Michael Bironneau
Toby Coleman Toby Coleman
Author Profile Icon Toby Coleman
Toby Coleman
Arrow right icon
View More author details
Toc

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 €18.99/month. Cancel anytime