Fitting the network

In order to run the training process, we will call the mx.fit function. It provides different sets of parameters and in the following case, we will be using a number of them:

mx.fit(nnet, mx.ADAM(), train_data_provider, eval_data = validation_data_provider, n_epoch = 100, callbacks = [mx.speedometer()]);

In the preceding example, we have done the following:

  1. nnet corresponds to the network we created before.
  2. mx.ADAM corresponds to a weight update function and ADAM is proven to converge networks extremely quickly.
  3. Next, we pass our train data provider consisting of images and labels.
  4. We set the eval_data parameter to monitor the performance of our network on validation_data_provider.
  5. n_epoch corresponds to the number of ...

Get Hands-On Computer Vision with Julia now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.