TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

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.