def softmax(w)
	    e = Numo::NMath.exp(w - (w.max))
	    dist = e / (e.sum)
	    return dist
	end
def softmax(w)
	    e = Numo::NMath.exp(w - (w.max))
	    dist = e / (e.sum)
	    return dist
	end
using softmax as output layer is recommended for classification where outputs are mutually exclusive