ngraph.opset7.embedding_segments_sum

ngraph.opset7.embedding_segments_sum(emb_table: _pyngraph.Node, indices: Union[_pyngraph.Node, int, float, numpy.ndarray], segment_ids: Union[_pyngraph.Node, int, float, numpy.ndarray], num_segments: Optional[Union[_pyngraph.Node, int, float, numpy.ndarray]] = None, default_index: Optional[Union[_pyngraph.Node, int, float, numpy.ndarray]] = None, per_sample_weights: Optional[Union[_pyngraph.Node, int, float, numpy.ndarray]] = None, name: Optional[str] = None) _pyngraph.Node

Return an EmbeddingSegmentsSum node.

EmbeddingSegmentsSum constructs an output tensor by replacing every index in a given input tensor with a row (from the weights matrix) at that index

Parameters
  • emb_table – Tensor containing the embedding lookup table.

  • indices – Tensor with indices.

  • segment_ids – Tensor with indices into the output Tensor

  • num_segments – Tensor with number of segments.

  • default_index – Scalar containing default index in embedding table to fill empty bags.

  • per_sample_weights – Weights to be multiplied with embedding table.

  • name – Optional name for output node.

Returns

EmbeddingSegmentsSum node