Added Regularized cost function for NN and visualize hand writing