Skip to content
Snippets Groups Projects
Commit 98616001 authored by Frisinghelli Daniel's avatar Frisinghelli Daniel
Browse files

Plot model state loss.

parent 7208f7b4
No related branches found
No related tags found
No related merge requests found
......@@ -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():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment