add average loss and accuracy output