Added softmax prediction and support for arbitrary transfer functions and sparsity penalty functions