przepływ tensorowy:: ops:: Nieposortowany segmentDołącz

#include <string_ops.h>

Łączy elementy inputs w oparciu o segment_ids .

Streszczenie

Oblicza połączenie łańcucha wzdłuż segmentów tensora. Biorąc pod uwagę segment_ids o randze N i data o randze N+M :

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

gdzie połączenie następuje po całym [j1...jN] tak, że segment_ids[j1...jN] = i. Łańcuchy są łączone w kolejności głównych wierszy.

Na przykład:

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']

Argumenty:

  • zakres: Obiekt Scope
  • wejścia: Wejście, które ma zostać połączone.
  • segment_ids: Tensor, którego kształt jest przedrostkiem data.shape. Identyfikatory segmentów wykluczonych nie są obsługiwane.
  • num_segments: Skalar.

Opcjonalne atrybuty (patrz Attrs ):

  • separator: Separator używany podczas łączenia.

Zwroty:

Konstruktory i destruktory

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)

Atrybuty publiczne

operation
output

Funkcje publiczne

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

Publiczne funkcje statyczne

Separator (StringPiece x)

Struktury

tensorflow:: ops:: UnsortedSegmentJoin:: Attrs

Opcjonalne moduły ustawiające atrybuty dla UnsortedSegmentJoin .

Atrybuty publiczne

operacja

Operation operation

wyjście

::tensorflow::Output output

Funkcje publiczne

Nieposortowany segmentDołącz

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

Nieposortowany segmentDołącz

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

węzeł

::tensorflow::Node * node() const 

operator::tensorflow::Wejście

 operator::tensorflow::Input() const 

operator::tensorflow::Wyjście

 operator::tensorflow::Output() const 

Publiczne funkcje statyczne

Separator

Attrs Separator(
  StringPiece x
)