diff --git a/ANN_Data_Generator.py b/ANN_Data_Generator.py index 73ec3cee4c4c9eb53c7d025552a896e685f876fa..07a7d7c509d1d3257398939517cdbd2f9dfe6187 100644 --- a/ANN_Data_Generator.py +++ b/ANN_Data_Generator.py @@ -15,6 +15,7 @@ TODO: Remove unnecessary lines -> Done TODO: Fix bug in 'input_data' calculation -> Done TODO: Change order of imports -> Done TODO: Improve calculation of normalization -> Done +TODO: Improve calculation of random point for stencil -> Done """ @@ -245,7 +246,7 @@ class TrainingDataGenerator(object): grid_spacing = 2 / (2 ** np.random.randint(3, high=9, size=1)) # Pick random point between left and right bound - point = np.random.random(1) * (self._right_bound-self._left_bound) + self._left_bound + point = np.random.uniform(self._left_bound, self._right_bound) # Adjust grid spacing if necessary for stencil creation while point - self._stencil_length/2 * grid_spacing < self._left_bound\