How to display loss while training?

#1

Hi,

MXNet newbie here,I am playing around with MNIST dataset.

during training,epoch and accuracy are printed out.

How do i print out loss?

I can see that the loss variable is series of values n x batch size.
something like:

[ 2.46115017 1.46115136 1.46115017 …, 1.46115017 1.46115017
2.46112204]
<NDArray 33600 @gpu(0)>

should i assume last value [-1] to be loss?

what is the correct way to compute loss during training (and print it out) ?

#2

Should be the loss for each image in the batch. So just take the average to get the average loss of the batch.