tf.contrib.framework.with_same_shape

View source on GitHub

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

expected_tensor Tensor with expected shape.
tensor Tensor of actual values.

The original tensor argument, possibly with assert ops added.