tensorflow::ops::ReduceJoin
#include <string_ops.h>Unisce un tensore di stringhe lungo le dimensioni specificate.
Riepilogo
Calcola l'unione delle stringhe attraverso le dimensioni nel tensore di stringa dato di forma [\\(d_0, d_1, ..., d_{n-1}\\)] . Restituisce un nuovo tensore creato unendo le stringhe di input con il separatore specificato (predefinito: stringa vuota). Gli indici negativi vengono contati all'indietro dalla fine, con -1 equivalente a n - 1 Se gli indici non sono specificati, le unioni vengono eseguite su tutte le dimensioni a partire da n - 1 fino a 0 .
Per esempio:
# tensor `a` is [["a", "b"], ["c", "d"]] tf.reduce_join(a, 0) ==> ["ac", "bd"] tf.reduce_join(a, 1) ==> ["ab", "cd"] tf.reduce_join(a, -2) = tf.reduce_join(a, 0) ==> ["ac", "bd"] tf.reduce_join(a, -1) = tf.reduce_join(a, 1) ==> ["ab", "cd"] tf.reduce_join(a, 0, keep_dims=True) ==> [["ac", "bd"]] tf.reduce_join(a, 1, keep_dims=True) ==> [["ab"], ["cd"]] tf.reduce_join(a, 0, separator=".") ==> ["a.c", "b.d"] tf.reduce_join(a, [0, 1]) ==> "acbd" tf.reduce_join(a, [1, 0]) ==> "abcd" tf.reduce_join(a, []) ==> [["a", "b"], ["c", "d"]] tf.reduce_join(a) = tf.reduce_join(a, [1, 0]) ==> "abcd"
Argomentazioni:
- ambito: un oggetto Scope
- input: L'input da unire. Tutti gli indici ridotti devono avere dimensione diversa da zero.
- reduction_indices: Le dimensioni su cui effettuare la riduzione. Le dimensioni vengono ridotte nell'ordine specificato. Omettere
reduction_indicesequivale a passare[n-1, n-2, ..., 0]. Sono supportati indici negativi da-na-1.
Attributi opzionali (vedere Attrs ):
- keep_dims: Se
True, mantieni le dimensioni ridotte con lunghezza1. - separatore: Il separatore da utilizzare durante l'unione.
Resi:
-
Output: Ha una forma uguale a quella dell'input con le dimensioni ridotte rimosse o impostate a1a seconda dikeep_dims.
Costruttori e distruttori | |
|---|---|
ReduceJoin (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input reduction_indices) | |
ReduceJoin (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input reduction_indices, const ReduceJoin::Attrs & attrs) |
attributi pubblici | |
|---|---|
operation | |
output | |
Funzioni pubbliche | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
Funzioni statiche pubbliche | |
|---|---|
KeepDims (bool x) | |
Separator (StringPiece x) | |
Strutture | |
|---|---|
| tensorflow::ops::ReduceJoin::Attrs | Impostatori di attributi opzionali per ReduceJoin . |
attributi pubblici
operazione
Operation operation
produzione
::tensorflow::Output output
Funzioni pubbliche
ReduceJoin
ReduceJoin( const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, ::tensorflow::Input reduction_indices )
ReduceJoin
ReduceJoin( const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, ::tensorflow::Input reduction_indices, const ReduceJoin::Attrs & attrs )
nodo
::tensorflow::Node * node() const
operatore::tensorflow::Input
operator::tensorflow::Input() const
operatore::tensoreflusso::output
operator::tensorflow::Output() const
Funzioni statiche pubbliche
KeepDims
Attrs KeepDims( bool x )
Separatore
Attrs Separator( StringPiece x )