Missed TensorFlow World? Check out the recap. Learn more

tf.contrib.framework.with_same_shape

View source on GitHub

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

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

Args:

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

Returns:

The original tensor argument, possibly with assert ops added.