July 2019
Intermediate to advanced
512 pages
19h 39m
English
We can think of placeholders as variables, where we only define the type and dimension, but do not assign the value. Values for the placeholders will be fed at runtime. We feed the data to the computational graphs using placeholders. Placeholders are defined with no values.
A placeholder can be defined using tf.placeholder(). It takes an optional argument called shape, which denotes the dimensions of the data. If shape is set to None, then we can feed data of any size at runtime. A placeholder can be defined as follows:
x = tf.placeholder("float", shape=None)
Let's consider a simple example ...
Read now
Unlock full access