ngraph.broadcast(data: Union[_pyngraph.Node, int, float, numpy.ndarray], target_shape: Union[_pyngraph.Node, int, float, numpy.ndarray], axes_mapping: Optional[Union[_pyngraph.Node, int, float, numpy.ndarray]] = None, broadcast_spec: str = 'NUMPY', name: Optional[str] = None) _pyngraph.Node

Create a node which broadcasts the input node’s values along specified axes to a desired shape.

  • data – The node with input tensor data.

  • target_shape – The node with a new shape we want to broadcast tensor to.

  • axes_mapping – The node with a axis positions (0-based) in the result that are being broadcast.

  • broadcast_spec – The type of broadcasting that specifies mapping of input tensor axes to output shape axes. Range of values: NUMPY, EXPLICIT, BIDIRECTIONAL.

  • name – Optional new name for output node.


New node with broadcast shape.