Broadcasts a tensor to a new shape by replicating the data along new or size-1 dimensions.
Arguments
- operand
(
tensorish)
Tensorish value of any data type.- shape
(
integer())
Target shape. Each mapped dimension must either match the corresponding operand dimension or the operand dimension must be 1.- broadcast_dimensions
(
integer())
Maps each dimension ofoperandto a dimension of the output. Must have length equal to the number of dimensions ofoperand.
Value
tensorish
Has the same data type as the input and the given shape.
It is ambiguous if the input is ambiguous.
StableHLO
Lowers to stablehlo::hlo_broadcast_in_dim().