diff --git a/ANN_Data_Generator.py b/ANN_Data_Generator.py index 45f96137c65585f8cd197e43b68818acd214dcfa..3ecc0085351f27bafdbe10f0480a84d92e982aa7 100644 --- a/ANN_Data_Generator.py +++ b/ANN_Data_Generator.py @@ -6,6 +6,7 @@ TODO: Improve '_generate_cell_data' TODO: Extract normalization (Combine smooth and troubled before normalizing) -> Done TODO: Adapt code to generate both normalized and non-normalized data -> Done TODO: Improve verbose output +TODO: Change order of methods -> Done """ @@ -52,11 +53,6 @@ class TrainingDataGenerator(object): self._save_data(data_dict) return data_dict - def _save_data(self, data): - for key in data.keys(): - name = self._data_dir + '/' + key + '_data.npy' - np.save(name, data[key]) - def _calculate_data_set(self, num_samples): num_smooth_samples = round(num_samples * self._balance) smooth_input, smooth_output = self._generate_cell_data(num_smooth_samples, @@ -165,6 +161,11 @@ class TrainingDataGenerator(object): normalized_input_data[i] = input_data[i] / max_function_value return normalized_input_data + def _save_data(self, data): + for key in data.keys(): + name = self._data_dir + '/' + key + '_data.npy' + np.save(name, data[key]) + # Get Training/Validation Datasets np.random.seed(1234)