tensorflow:: ops:: Nieposortowane dołączenie segmentów

#include <string_ops.h>

Łączy elementy inputs na podstawie segment_ids .

Streszczenie

Oblicza połączenie ciągów 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 obejmuje wszystkie [j1...jN] tak, że segment_ids[j1...jN] = i. Ciągi są łączone w kolejności 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 zakresu
  • wejścia: dane wejściowe, które mają zostać połączone.
  • segment_ids: Tensor, którego kształt jest prefiksem data.shape. Ujemne identyfikatory segmentów nie są obsługiwane.
  • num_segments: Skalar.

Atrybuty opcjonalne (patrz Attrs ):

  • separator: Separator używany przy łączeniu.

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 settery atrybutów dla UnsortedSegmentJoin .

Atrybuty publiczne

działanie

Operation operation

wyjście

::tensorflow::Output output

Funkcje publiczne

Nieposortowane dołączenie segmentów

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

Nieposortowane dołączenie segmentów

 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::Input

 operator::tensorflow::Input() const 

operator::tensorflow::Output

 operator::tensorflow::Output() const 

Publiczne funkcje statyczne

Separator

Attrs Separator(
  StringPiece x
)