About Lesson
A placeholder has the role of feeding the tensor. The Data to flow inside the tensors are initialized by the Placeholder. To provide a placeholder, we need to use the method feed_dict. The placeholder will be fed only within a session.
Syntax:
tf.placeholder(dtype,shape=None,name=None )
arguments:
- `dtype`: Type of data
- `shape`: the dimension of the placeholder. Optional. By default, the shape of the data
- `name`: Name of the placeholder. Optional
import tensorflow as tf data_placeholder_a = tf.placeholder(tf.float32, name = "data_placeholder_a") print(data_placeholder_a)
The output will be Tensor(“data_placeholder_a:0”, dtype=float32)