December 2017
Intermediate to advanced
536 pages
14h 23m
English
We proceed with the recipe as follows:
import tensorflow as tf# Global parametersDATA_FILE = 'boston_housing.csv'BATCH_SIZE = 10NUM_FEATURES = 14
def data_generator(filename): """ Generates Tensors in batches of size Batch_SIZE. Args: String Tensor Filename from which data is to be read Returns: Tensors feature_batch and label_batch """
f_queue = tf.train.string_input_producer(filename)reader = tf.TextLineReader(skip_header_lines=1) # Skips the first line _, value = reader.read(f_queue)
Read now
Unlock full access