added KL sparsity support to network and training