tensoreflusso:: ops:: UnsortedSegmentJoin

#include <string_ops.h>

Unisce gli elementi degli inputs in base a 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 il join è su tutto [j1...jN] tale che segment_ids[j1...jN] = i. Le stringhe vengono unite in ordine di riga maggiore.

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

Argomenti:

  • scope: 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: uno scalare.

Attributi facoltativi (vedi Attrs ):

  • separatore: il separatore da utilizzare durante l'unione.

Ritorna:

  • Output : il tensore di uscita.

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 pubbliche statiche

Separator (StringPiece x)

Strutture

tensorflow:: ops:: UnsortedSegmentJoin:: Attrs

Setter di attributi facoltativi 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::tensorflow::Output

 operator::tensorflow::Output() const 

Funzioni pubbliche statiche

Separatore

Attrs Separator(
  StringPiece x
)