fix bug in softmax
added test for sparse data memory layer
removed inefficiency in softmax, fixg memory bugs in  sparse data layer, improved performance in matrix operations