tf.broadcast_dynamic_shape
Stay organized with collections
Save and categorize content based on your preferences.
Computes the shape of a broadcast given symbolic shapes.
tf.broadcast_dynamic_shape(
shape_x, shape_y
)
When shape_x and shape_y are Tensors representing shapes (i.e. the result of
calling tf.shape on another Tensor) this computes a Tensor which is the shape
of the result of a broadcasting op applied in tensors of shapes shape_x and
shape_y.
For example, if shape_x is [1, 2, 3] and shape_y is [5, 1, 3], the result is a
Tensor whose value is [5, 2, 3].
This is useful when validating the result of a broadcasting operation when the
tensors do not have statically known shapes.
Args |
shape_x
|
A rank 1 integer Tensor , representing the shape of x.
|
shape_y
|
A rank 1 integer Tensor , representing the shape of y.
|
Returns |
A rank 1 integer Tensor representing the broadcasted shape.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.broadcast_dynamic_shape\n\n\u003cbr /\u003e\n\n|------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------|\n| [TensorFlow 1 version](/versions/r1.15/api_docs/python/tf/broadcast_dynamic_shape) | [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.0.0/tensorflow/python/ops/array_ops.py#L357-L379) |\n\nComputes the shape of a broadcast given symbolic shapes.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.broadcast_dynamic_shape`](/api_docs/python/tf/broadcast_dynamic_shape)\n\n\u003cbr /\u003e\n\n tf.broadcast_dynamic_shape(\n shape_x, shape_y\n )\n\nWhen shape_x and shape_y are Tensors representing shapes (i.e. the result of\ncalling tf.shape on another Tensor) this computes a Tensor which is the shape\nof the result of a broadcasting op applied in tensors of shapes shape_x and\nshape_y.\n\nFor example, if shape_x is \\[1, 2, 3\\] and shape_y is \\[5, 1, 3\\], the result is a\nTensor whose value is \\[5, 2, 3\\].\n\nThis is useful when validating the result of a broadcasting operation when the\ntensors do not have statically known shapes.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|-----------|---------------------------------------------------------|\n| `shape_x` | A rank 1 integer `Tensor`, representing the shape of x. |\n| `shape_y` | A rank 1 integer `Tensor`, representing the shape of y. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A rank 1 integer `Tensor` representing the broadcasted shape. ||\n\n\u003cbr /\u003e"]]