anchor.diff:                  l.W <- l.W |> makeReverse i
                   l.b <- l.b |> makeReverse i
   
  -            let error:D = loss (runNetwork' mbX n) mbY
  -            error |> reverseProp (D 1.)
  +            let L:D = loss (runNetwork' mbX n) mbY
  +            L |> reverseProp (D 1.)
   
               for l in n.layers do
                   l.W <- primal (l.W.P - eta * l.W.A)
                   l.b <- primal (l.b.P - eta * l.b.A)
   
  -            printfn "Epoch %i, minibatch %i, error %f" j b (float error)
  +            printfn "Epoch %i, minibatch %i, loss %f" j b (float L)
               b <- b + 1
  -            if float error >= epsilon then j <- timeout
           j <- j + 1
   
   (**
   The Obligatory MNIST Example
   ----------------------------
   
  -The MNIST (for "Mixed National Institute of Standards and Technology") database of handwritten digits is
  -
  +The MNIST database of handwritten digits is commonly used for demonstrating neural network training. The database contains 60,000 training images and 10,000 testing images. More information on the database and downloadable files can be found [here](http://yann.lecun.com/exdb/mnist/).
   
   The following code reads the standard MNIST files into matrices.
   *)
  
positive.code: 
  We can also have more than one hidden layer.
  
  For training networks, we will make use of reverse mode AD for propagating an error $E$ at the output backwards through the network weights. This will give us the partial derivative of the error at the output with respect to each weight $w_i$ and bias $b_i$ in the network, which we will then use in an update rule
  
  $$$
   \begin{eqnarray*}
   \Delta w_i &=& -\eta \frac{\partial E}{\partial w_i} \; ,\\
   \Delta b_i &=& -\eta \frac{\partial E}{\partial b_i} \; ,\\
   \end{eqnarray*}
  
  where $\eta$ is the learning rate.
  
  We will use the [quadratic error](https://en.wikipedia.org/wiki/Mean_squared_error)
  
  $$$
   E = \sum_i \Vert \mathbf{y}_i - \mathbf{a}(\mathbf{x}_i) \Vert^{2} \; ,
  
  where $\mathbf{y}_i$ are the training targets and $\mathbf{a}(\mathbf{x}_i)$ are the vectors of outputs at the last layer of the network when training inputs $\mathbf{x}_i$ are supplied to the first layer.
  
  Please see the [Nested AD](gettingstarted-nestedad.html) page for a better understanding of the low-level usage of adjoints and their backwards propagation.
  
  
negative.code: Neural Networks
  ===============
  
  [Artificial neural networks](http://en.wikipedia.org/wiki/Artificial_neural_network) are computational models inspired by biological nervous systems, capable of approximating functions that depend on a large number of inputs. A network is defined by a connectivity structure and a set of weights between interconnected processing units ("neurons"). Neural networks "learn" a given task by tuning the set of weights under an optimization procedure.
  
  Let's create a [feedforward neural network](http://en.wikipedia.org/wiki/Feedforward_neural_network) with DiffSharp and implement the [backpropagation](http://en.wikipedia.org/wiki/Backpropagation) algorithm for training it. As mentioned before, backpropagation is just a special case of reverse mode AD.
  
  We start by defining our neural network structure.
  
  