Placeholders

Think of placeholders as variables where you only define the type and dimension but will not assign the value. Placeholders are defined with no values. Values for the placeholders will be fed at runtime. Placeholders have an optional argument called shape, which specifies the dimensions of the data. If the shape is set to None then we can feed data of any size at runtime. Placeholders can be defined using the tf.placeholder() function:

x = tf.placeholder("float", shape=None)

To put it in simple terms, we use tf.Variable to store the data and tf.placeholder for feeding the external data.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.107.193