tf.keras.backend.placeholder

View source on GitHub

Instantiates a placeholder tensor and returns it.

tf.keras.backend.placeholder(
    shape=None, ndim=None, dtype=None, sparse=False, name=None, ragged=False
)

Arguments:

Raises:

Returns:

Tensor instance (with Keras metadata included).

Examples:

>>> input_ph = tf.keras.backend.placeholder(shape=(2, 4, 5))
>>> input_ph
<tf.Tensor 'Placeholder_...' shape=(2, 4, 5) dtype=float32>