# tf.contrib.framework.get_placeholders

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/framework/python/framework/graph_util.py#L138-L171) |

Get placeholders of a graph.

    tf.contrib.framework.get_placeholders(
        graph
    )

#### For example:

    a = tf.compat.v1.placeholder(dtype=tf.float32, shape=[2, 2], name='a')
    a = tf.compat.v1.placeholder(dtype=tf.int32, shape=[3, 2], name='b')

    tf.contrib.framework.get_placeholders(tf.compat.v1.get_default_graph())
    # Returns:
    #  [<tf.Tensor 'a:0' shape=(2, 2) dtype=float32>,
    #   <tf.Tensor 'b:0' shape=(3, 2) dtype=int32>]

<br />

<br />

<br />

| ## Args ||
|---|---|
| `graph` | A tf.Graph. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A list contains all placeholders of given graph. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `TypeError` | If `graph` is not a tensorflow graph. |

<br />