tensorflow::ops::UnsortedSegmentJoin
#include <string_ops.h> Unisce gli elementi degli inputs in base agli segment_ids .
Riepilogo
Calcola l'unione delle stringhe lungo i segmenti di un tensore. Dati segment_ids con rango N e data con rango N+M :
`output[i, k1...kM] = strings.join([data[j1...jN, k1...kM])`
dove l'unione è su tutti [j1...jN] tali che segment_ids[j1...jN] = i. Le stringhe vengono unite in ordine riga per riga.
Per esempio:
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']Argomentazioni:
- ambito: un oggetto Scope
- input: L'input da unire.
- segment_ids: Un tensore la cui forma è un prefisso di data.shape. Gli ID di segmento negativi non sono supportati.
- num_segments: Un valore scalare.
Attributi opzionali (vedere Attrs ):
- separatore: Il separatore da utilizzare durante l'unione.
Resi:
-
Output: Il tensore di output.
Costruttori e distruttori | |
|---|---|
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) |
attributi pubblici | |
|---|---|
operation | |
output | |
Funzioni pubbliche | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
Funzioni statiche pubbliche | |
|---|---|
Separator (StringPiece x) | |
Strutture | |
|---|---|
| tensorflow::ops::UnsortedSegmentJoin::Attrs | Impostatori di attributi opzionali per UnsortedSegmentJoin . |
attributi pubblici
operazione
Operation operation
produzione
::tensorflow::Output output
Funzioni pubbliche
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 )
nodo
::tensorflow::Node * node() const
operatore::tensorflow::Input
operator::tensorflow::Input() const
operatore::tensoreflusso::output
operator::tensorflow::Output() const
Funzioni statiche pubbliche
Separatore
Attrs Separator( StringPiece x )