# tf.contrib.framework.with_same_shape

<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/tensor_util.py#L215-L229) |

Assert tensors are the same shape, from the same graph.

    tf.contrib.framework.with_same_shape(
        expected_tensor, tensor
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `expected_tensor` | Tensor with expected shape. |
| `tensor` | Tensor of actual values. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| The original tensor argument, possibly with assert ops added. ||

<br />