From ea6e6ee1040fa85f743ab50b699fbeb04d9a0522 Mon Sep 17 00:00:00 2001 From: jules Date: Tue, 20 Mar 2018 23:35:18 +0100 Subject: scripts --- trainer/plugins.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'trainer/plugins.py') diff --git a/trainer/plugins.py b/trainer/plugins.py index f8c299b..0126870 100644 --- a/trainer/plugins.py +++ b/trainer/plugins.py @@ -141,7 +141,7 @@ class SaverPlugin(Plugin): class GeneratorPlugin(Plugin): - pattern = 'ep{}-s{}.wav' + pattern = 'd-{}-ep{}-s{}.wav' def __init__(self, samples_path, n_samples, sample_length, sample_rate): super().__init__([(1, 'epoch')]) @@ -159,7 +159,7 @@ class GeneratorPlugin(Plugin): for i in range(self.n_samples): write_wav( os.path.join( - self.samples_path, self.pattern.format(epoch_index, i + 1) + self.samples_path, self.pattern.format(int(time.time()), epoch_index, i + 1) ), samples[i, :], sr=self.sample_rate, norm=True ) @@ -168,7 +168,7 @@ class GeneratorPlugin(Plugin): class StatsPlugin(Plugin): data_file_name = 'stats.pkl' - plot_pattern = '{}.svg' + plot_pattern = 'd-{}-{}.svg' def __init__(self, results_path, iteration_fields, epoch_fields, plots): super().__init__([(1, 'iteration'), (1, 'epoch')]) @@ -252,7 +252,7 @@ class StatsPlugin(Plugin): pyplot.legend() pyplot.savefig( - os.path.join(self.results_path, self.plot_pattern.format(name)) + os.path.join(self.results_path, self.plot_pattern.format(int(time.time()), name)) ) @staticmethod -- cgit v1.2.3-70-g09d2