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
Deep Learning with Microsoft Cognitive Toolkit Quick Start Guide

You're reading from   Deep Learning with Microsoft Cognitive Toolkit Quick Start Guide A practical guide to building neural networks using Microsoft's open source deep learning framework

Arrow left icon
Product type Paperback
Published in Mar 2019
Publisher Packt
ISBN-13 9781789802993
Length 208 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Willem Meints Willem Meints
Author Profile Icon Willem Meints
Willem Meints
Arrow right icon
View More author details
Toc

Table of Contents (9) Chapters Close

Preface 1. Getting Started with CNTK 2. Building Neural Networks with CNTK FREE CHAPTER 3. Getting Data into Your Neural Network 4. Validating Model Performance 5. Working with Images 6. Working with Time Series Data 7. Deploying Models to Production 8. Other Books You May Enjoy

Training the neural network

Now that we have all the components for the deep learning defined, let's train it. You can train a model in CNTK using a combination of a learner and trainer. We're going to need to define those and then feed data through the trainer to train the model. Let's see how that works.

Choosing a learner and setting up training

There are several learners to choose from. For our first model, we are going to use the stochastic gradient descent learner. Let's configure the learner and trainer to train the neural network:

from cntk.learners import sgd
from cntk.train.trainer import Trainer

learner = sgd(z.parameters, 0.01)

trainer = Trainer(z, (loss, error_rate), [learner])

To configure...

You have been reading a chapter from
Deep Learning with Microsoft Cognitive Toolkit Quick Start Guide
Published in: Mar 2019
Publisher: Packt
ISBN-13: 9781789802993
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 AU $24.99/month. Cancel anytime