From 98616001d9e9c7c10afa27e25ff3a6fa326682f9 Mon Sep 17 00:00:00 2001 From: "Daniel.Frisinghelli" <daniel.frisinghelli@eurac.edu> Date: Tue, 19 Oct 2021 12:50:51 +0200 Subject: [PATCH] Plot model state loss. --- climax/core/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/climax/core/utils.py b/climax/core/utils.py index 4081d02..26007b8 100644 --- a/climax/core/utils.py +++ b/climax/core/utils.py @@ -168,7 +168,7 @@ def plot_loss(state_file, figsize=(10, 10), step=5): # x axis limits axes[0].set_xticks(np.arange(0, ntbatches * epochs[-1], ntbatches * step)) - axes[0].set_xticklabels(epochs[::step], fontsize=14) + axes[0].set_xticklabels(epochs[::step]) axes[0].set_xlabel('Epoch', fontsize=14) axes[0].set_ylabel('Loss', fontsize=14) axes[1].set(xticks=[], xticklabels=[]) @@ -179,8 +179,8 @@ def plot_loss(state_file, figsize=(10, 10), step=5): yl_max, yl_min = (ceil_decimal(max_loss, decimal=1), floor_decimal(min_loss, decimal=1)) axes[0].set_ylim(yl_min, yl_max) - axes[0].set_yticks(np.arange(yl_min, yl_max + 0.2, 0.2)) - axes[0].set_yticklabels(np.arange(yl_min, yl_max + 0.2, 0.2), fontsize=14) + axes[0].tick_params(axis='both', which='major', labelsize=14) + axes[0].tick_params(axis='both', which='minor', labelsize=14) # compute early stopping point if loss['valid_loss'].any(): -- GitLab