def provide_input(self) -> List[tf.Tensor]: with tf.name_scope("loading"): training_data = get_data_from_tfrecord("./data/train.tfrecord", self.BATCH_SIZE) with tf.name_scope("training"): parameters = self.build_training_graph(training_data) return parameters
def provide_input(self) -> List[tf.Tensor]: """Prepare input data for prediction.""" with tf.name_scope('loading'): prediction_input, expected_result = get_data_from_tfrecord( "./data/test.tfrecord", self.BATCH_SIZE, flattened=True).get_next() with tf.name_scope('pre-processing'): prediction_input = tf.reshape( prediction_input, shape=(self.BATCH_SIZE, ModelTrainer.IN_N)) expected_result = tf.reshape( expected_result, shape=(self.BATCH_SIZE,)) return [prediction_input, expected_result]