tensorflow:: ops:: UnsortedSegmentJoin

#include <string_ops.h>

segment_idsに基づいてinputsの要素を結合します。

まとめ

テンソルのセグメントに沿って文字列結合を計算します。ランクNのsegment_idsとランクN+Mのdataが与えられた場合:

`output[i, k1...kM] = strings.join([data[j1...jN, k1...kM])`

結合は、segment_ids[j1...jN] = i となるすべての [j1...jN] に対して行われます。文字列は行優先順で結合されます。

例えば:

inputs = [['Y', 'q', 'c'], ['Y', '6', '6'], ['p', 'G', 'a']]
output_array = string_ops.unsorted_segment_join(inputs=inputs,
                                                segment_ids=[1, 0, 1],
                                                num_segments=2,
                                                separator=':'))
# output_array ==> [['Y', '6', '6'], ['Y:p', 'q:G', 'c:a']]

inputs = ['this', 'is', 'a', 'test']
output_array = string_ops.unsorted_segment_join(inputs=inputs,
                                                segment_ids=[0, 0, 0, 0],
                                                num_segments=1,
                                                separator=':'))
# output_array ==> ['this:is:a:test']

議論:

  • スコープ:スコープオブジェクト
  • inputs: 結合する入力。
  • segment_ids: data.shape の接頭辞となる形状を持つテンソル。負のセグメント ID はサポートされていません。
  • num_segments: スカラー値。

オプション属性( Attrs参照):

  • 区切り文字:結合時に使用する区切り文字。

返品:

  • Output :出力テンソル。

コンストラクターとデストラクタ

UnsortedSegmentJoin (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input segment_ids, :: tensorflow::Input num_segments)
UnsortedSegmentJoin (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input segment_ids, :: tensorflow::Input num_segments, const UnsortedSegmentJoin::Attrs & attrs)

公開属性

operation
output

公的機能

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

パブリック静的関数

Separator (StringPiece x)

構造

tensorflow:: ops:: UnsortedSegmentJoin:: Attrs

UnsortedSegmentJoinのオプション属性セッター。

公開属性

手術

Operation operation

出力

::tensorflow::Output output

公的機能

未ソートセグメント結合

 UnsortedSegmentJoin(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input inputs,
  ::tensorflow::Input segment_ids,
  ::tensorflow::Input num_segments
)

未ソートセグメント結合

 UnsortedSegmentJoin(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input inputs,
  ::tensorflow::Input segment_ids,
  ::tensorflow::Input num_segments,
  const UnsortedSegmentJoin::Attrs & attrs
)

ノード

::tensorflow::Node * node() const 

operator::tensorflow::Input

 operator::tensorflow::Input() const 

operator::tensorflow::Output

 operator::tensorflow::Output() const 

パブリック静的関数

分離器

Attrs Separator(
  StringPiece x
)