anchor.diff:  There are wrappers `arg1`, `arg3`, `arg4`, ... for different number of arguments.
   The return type of a compiled function is always a tensor.
   If the result of the expression is a scalar (as in our case), the tensor will have rank zero.
  +*)
  +
  +(**
  +
  +Initializing the model parameters
  +---------------------------------
  +
  +We initialize the parameters model by calling `mi.InitPars`.
  +The only argument to that function is the seed to use for random initialization of the model's parameters.
  +`mi.InitPars` samples from an uniform distribution with support $[-0.01, 0.01]$ to initialize all model parameters that had no initializer specified when calling `mb.Param`.
  +
  +*)
  +
  +mi.InitPars 123
  +
  +(**
  +
  +We use a fixed seed of 123 to get reproducible results, but you can change it to a time-dependent value to get varying starting points.
  +
   
   Testing the model
   -----------------
  
positive.code:     ....
      Test loss after  1000 iterations: 0.2713
  
  In this example the high learning rate of 0.1 is feasible because we are evaluating the gradient on the whole dataset (50 000 images) and thus it is very stable.
  If we did [mini-batch training](http://www.cs.toronto.edu/~tijmen/csc321/slides/lecture_slides_lec6.pdf) instead, i.e. split the training set into small mini-batches and update the parameters after estimating the gradient on a mini-batch, we would have to use a smaller learning rate.
  
  
  Deep.Net also provides a generic training function with parameter and loss logging, automatic adjustment of the learning rate and automatic termination.
  We will show its use in a later chapter.
  
  
negative.code: We can now test our work so far by calculating the loss of the *untrained* model on the MNIST test set.
  *)
  
  let tstLossUntrained = lossFn mnist.TstImgsFlat mnist.TstLbls
                         |> ArrayND.value
  printfn "Test loss (untrained): %.4f" tstLossUntrained
  
  (**
  We call our compiled loss function as expected and pipe the result into the `Tensor.value` function to extract the float value from the zero-rank tensor.
  This should print something similar to
  
  