operate along any dimension for logistic loss (CPU)
logistic loss ND-tensor (GPU)
Softmax-loss along customized dimension
softmax-loss ND-tensor (GPU)