Tensorflow's place holder's parameter shape as a list with None vale

Viewed 48

I am reading this module from this github repo. In Class_NN(), they have defined to placeholders:

def __init__(self, input_size, hidden_size, output_size, training_size):
    # input and output placeholders
    self.x = tf.placeholder(tf.float32, [None, input_size])# type and size of the input - why do we have [none,]?
    self.y = tf.placeholder(tf.float32, [None, output_size])
    self.task_idx = tf.placeholder(tf.int32)

I know that the first parameter of tf.placeholder, tf.float32, is the type of value that x supposed to get and the second parameter is the shape of x as a tensor. Here the shape parameter is assigned as a list. What I don't understand is why the 0_indexed value in this list is None?

0 Answers
Related