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
.
This is useful when validating the result of a broadcasting operation when the
tensors do not have statically known shapes.
Example:
shape_x = (1, 2, 3)
shape_y = (5, 1, 3)
tf.broadcast_dynamic_shape(shape_x, shape_y)
<tf.Tensor: shape=(3,), dtype=int32, numpy=array([5, 2, 3], ...>
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.
|
Raises |
InvalidArgumentError
|
If the two shapes are incompatible for
broadcasting.
|
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. Some content is licensed under the numpy license.
Last updated 2024-01-23 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-01-23 UTC."],[],[]]