Add sparsity constraint on the hidden layer

1. Added a function that compute KL divergence between each number in an
array and a specific number
2. Added the sparsity penalty term to the cost calculation
3. Added the sparsity penalty term to the derivative of the cost