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.
Training the neural network
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...