modify tutorials for plotter compatibility

This commit is contained in:
Dario Coscia
2023-10-31 12:03:04 +01:00
committed by Nicola Demo
parent 5336f36f08
commit d556c592e0
36 changed files with 290 additions and 260 deletions

View File

@@ -227,7 +227,7 @@ class Plotter:
raise ValueError(f'{metric} not a valid metric. Available metrics are {list(trainer_metrics.keys())}.')
loss = trainer_metrics[metric]
epochs = range(len(loss))
plt.plot(epochs, loss, label=metric, **kwargs)
plt.plot(epochs, loss, **kwargs)
# plotting
plt.xlabel('epoch')
@@ -243,5 +243,3 @@ class Plotter:
# saving in file
if filename:
plt.savefig(filename)
else:
plt.show()