added loss to mnist sgd output