Plotting loss curve

Good catch! The code has indeed the typo and it should use the inplace addition instead of the assignment.