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

View source on GitHub

Assert the shape of this Dataset.
shapes = [tf.TensorShape([16, 256]), tf.TensorShape([None, 2])]
result = dataset.apply(
print(result.output_shapes)  # ==> "((16, 256), (<unknown>, 2))"

If dataset shapes and expected_shape, are fully defined, assert they match. Otherwise, add assert op that will validate the shapes when tensors are evaluated, and set shapes on tensors, respectively.

Note that unknown dimension in expected_shapes will be ignored.



A Dataset transformation function, which can be passed to