From ebd09ef377b4147c4109e28a93eb328d685d0b6d Mon Sep 17 00:00:00 2001 From: "Daniel.Frisinghelli" <daniel.frisinghelli@eurac.edu> Date: Thu, 21 Oct 2021 12:50:22 +0200 Subject: [PATCH] Improved plotting for loss. --- climax/core/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/climax/core/utils.py b/climax/core/utils.py index cf25920..2051779 100644 --- a/climax/core/utils.py +++ b/climax/core/utils.py @@ -199,8 +199,8 @@ def plot_loss(state_file, figsize=(10, 10), step=5, palette='mako'): # create a patch (proxy artist) for every color ulabels = ['Training', 'Validation'] - patches = [mlines.Line2D([], [], color='black', ls=c, label=l) for c, l in - zip(['-', '--'], ulabels)] + patches = [mlines.Line2D([], [], color=c, ls=ls, label=l) for c, ls, l in + zip(colors, ['-', '--'], ulabels)] # plot patches as legend ax.legend(handles=patches, loc='upper left', frameon=False, ncol=2, -- GitLab