read_loss_log function

Function for reading a log file containing a record of the loss during training.