tensoreflusso:: ops:: ResourceScatterNdAdd
#include <state_ops.h>Applica un'addizione sparsa a singoli valori o sezioni in una Variabile .
Riepilogo
 ref è un Tensor di rango P e indices è un Tensor di rango Q .
 indices devono essere tensori interi, contenenti indici in ref . Deve essere di forma [d_0, ..., d_{Q-2}, K] dove 0 < K <= P .
 La dimensione più interna degli indices (con lunghezza K ) corrisponde agli indici in elementi (se K = P ) o fette (se K < P ) lungo la K -esima dimensione di ref .
 updates sono Tensor di rango Q-1+PK con forma: 
[d_0, ..., d_{Q-2}, ref.shape[K], ..., ref.shape[P-1]]
Ad esempio, supponiamo di voler aggiungere 4 elementi sparsi a un tensore di rango 1 a 8 elementi. In Python, tale aggiunta sarebbe simile a questa:
ref = tf.Variable([1, 2, 3, 4, 5, 6, 7, 8], use_resource=True) indices = tf.constant([[4], [3], [1], [7]]) updates = tf.constant([9, 10, 11, 12]) add = tf.scatter_nd_add(ref, indices, updates) with tf.Session() as sess: print sess.run(add)
L'aggiornamento risultante a ref sarebbe simile al seguente:
[1, 13, 3, 14, 14, 6, 7, 20]
 Vedi tf.scatter_nd per maggiori dettagli su come apportare aggiornamenti alle sezioni.
Argomenti:
- scope: un oggetto Scope
- ref: un handle di risorsa. Deve provenire da un VarHandleOp.
- indici: A Tensore . Deve essere uno dei seguenti tipi: int32, int64. Un tensore di indici nel rif.
- aggiornamenti: Un Tensore . Deve essere dello stesso tipo del rif. Un tensore di valori da aggiungere al rif.
 Attributi facoltativi (vedi Attrs ):
- use_locking: un valore bool opzionale. Il valore predefinito è Vero. Se True, l'assegnazione sarà protetta da un lucchetto; altrimenti il comportamento non è definito, ma può mostrare meno contesa.
Resi:
-  l' Operationcreata
| Costruttori e distruttori | |
|---|---|
| ResourceScatterNdAdd (const :: tensorflow::Scope & scope, :: tensorflow::Input ref, :: tensorflow::Input indices, :: tensorflow::Input updates) | |
| ResourceScatterNdAdd (const :: tensorflow::Scope & scope, :: tensorflow::Input ref, :: tensorflow::Input indices, :: tensorflow::Input updates, const ResourceScatterNdAdd::Attrs & attrs) | 
| Attributi pubblici | |
|---|---|
| operation | |
| Funzioni pubbliche | |
|---|---|
| operator::tensorflow::Operation () const | |
| Funzioni pubbliche statiche | |
|---|---|
| UseLocking (bool x) | |
| Strutture | |
|---|---|
| tensorflow:: ops:: ResourceScatterNdAdd:: Attrs | Setter di attributi facoltativi per ResourceScatterNdAdd . | 
Attributi pubblici
operazione
Operation operation
Funzioni pubbliche
ResourceScatterNdAdd
ResourceScatterNdAdd( const ::tensorflow::Scope & scope, ::tensorflow::Input ref, ::tensorflow::Input indices, ::tensorflow::Input updates )
ResourceScatterNdAdd
ResourceScatterNdAdd( const ::tensorflow::Scope & scope, ::tensorflow::Input ref, ::tensorflow::Input indices, ::tensorflow::Input updates, const ResourceScatterNdAdd::Attrs & attrs )
operator::tensorflow::Operazione
operator::tensorflow::Operation() const
Funzioni pubbliche statiche
UsaLocking
Attrs UseLocking( bool x )