Defining a neural network

So, our data is ready and now it is time to proceed to defining the network itself. To train a model, users are required to perform the following two steps:

  1. Configure the model using the symbol parameter
  2. Then, call model.Feedforward.create to create the model

We will start by creating a simple neural network with a hidden layer. MXNet requires us to define the input data, the neural network's structure, and the output layer. We will be using the following three symbol parameters to configure the network:

  • mx.Variable to define the input data
  • mx.FullyConnected to create a fully connected dense layer
  • mx.SoftmaxOutput to define the output of the network

Consider the following code to use these:

using MXNetarch = ...

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.