tensorflow :: ops :: UnsortedSegmentJoin
#include <string_ops.h>
Łączy elementy danych inputs
na podstawie identyfikatorów segment_ids
.
streszczenie
Oblicza połączenie łańcuchowe wzdłuż segmentów tensora. Biorąc segment_ids
z rangą N
i data
z rankingu N+M
:
`output[i, k1...kM] = strings.join([data[j1...jN, k1...kM])`
gdzie sprzężenie jest nad wszystkimi [j1 ... jN] takie, że id_segmentu [j1 ... jN] = i. Ciągi są łączone w kolejności głównej.
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
- dane wejściowe: wejście, które ma zostać połączone.
- segment_ids: tensor, którego kształt jest prefiksem data.shape. Negatywne identyfikatory segmentów nie są obsługiwane.
- num_segments: skalar.
Atrybuty opcjonalne (patrz Attrs
):
- separator: separator używany podczas łączenia.
Zwroty:
-
Output
: tensor wyjściowy.
Konstruktorzy i niszczyciele | |
---|---|
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 metody ustawiające atrybuty dla UnsortedSegmentJoin . |
Atrybuty publiczne
operacja
Operation operation
wynik
::tensorflow::Output output
Funkcje publiczne
UnsortedSegmentJoin
UnsortedSegmentJoin( const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, ::tensorflow::Input segment_ids, ::tensorflow::Input num_segments )
UnsortedSegmentJoin
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 )