Esempio n. 1
0
    def reset_val_batches(self):

        self.val_batches = int(
            np.floor(self.val_input_data.shape[0] / self.batch_size))

        if self.val_batches > 0:
            self.val_input_batches = self.val_input_data
            self.val_output_batches = self.val_output_data

            self.val_input_batches = self.val_input_batches[:self.batch_size *
                                                            self.val_batches]
            self.val_output_batches = self.val_output_batches[:self.
                                                              batch_size *
                                                              self.val_batches]

        else:
            self.val_input_batches = np.zeros(
                (self.batch_size, self.val_input_data.shape))
            self.val_output_batches = np.zeros(
                (self.batch_size, self.val_output_data.shape))

            self.val_input_batches = data.reshape_1D_input(
                self.val_input_batches)

            self.val_input_batches[:self.val_input_data.
                                   shape[0]] = self.val_input_data
            self.val_output_batches[:self.val_output_data.
                                    shape[0]] = self.val_output_data

        if self.frame_work == 'Tensorflow':
            self.val_input_batches, self.val_output_batches = data.convert_to_tensorflow_minbatch(
                self.val_input_batches, self.val_output_batches,
                self.batch_size)
Esempio n. 2
0
 def reshape_1D_input(self):
     self.all_input_data = data.reshape_1D_input(self.all_input_data)