tensorflow::ops::SparseFillEmptyRows
#include <sparse_ops.h> Riempie le righe vuote nel SparseTensor 2D di input con un valore predefinito.
Riepilogo
L'input SparseTensor è rappresentato tramite la tupla di input ( indices , values , dense_shape ). L'output SparseTensor ha la stessa dense_shape ma con indici output_indices e valori output_values .
Questa operazione inserisce una singola voce per ogni riga che non ha valori. L'indice viene creato come [row, 0, ..., 0] e il valore inserito è default_value .
Ad esempio, supponiamo che sp_input abbia forma [5, 6] e valori non vuoti:
[0, 1]: a [0, 3]: b [2, 0]: c [3, 1]: d
Le righe 1 e 4 sono vuote, quindi l'output avrà la forma [5, 6] con i seguenti valori:
[0, 1]: a [0, 3]: b [1, 0]: default_value [2, 0]: c [3, 1]: d [4, 0]: default_value
Il SparseTensor di output sarà in ordine riga per riga e avrà la stessa forma dell'input.
Questa operazione restituisce anche un vettore indicatore di forma [dense_shape[0]] tale che
empty_row_indicator[i] = True iff row i was an empty row.
E un vettore di mappatura dell'indice inverso a forma di [indices.shape[0]] che viene utilizzato durante la retropropagazione,
reverse_index_map[j] = out_j s.t. indices[j, :] == output_indices[out_j, :]
Argomentazioni:
- ambito: un oggetto Scope
- indici: 2-D. Gli indici del tensore sparso.
- valori: 1-D. i valori del tensore sparso.
- dense_shape: 1-D. La forma del tensore sparso.
- default_value: 0-D. Valore predefinito da inserire nella posizione
[row, 0, ..., 0]per le righe mancanti nel tensore sparso di input. output indices: 2-D. Gli indici del tensore sparso riempito.
Resi:
-
Outputoutput_indices -
Outputoutput_values: 1-D. i valori del tensore sparso riempito. -
Outputempty_row_indicator: 1-D. Indica se la riga densa era mancante nel tensore sparso di input. -
Outputreverse_index_map: 1-D. Una mappa dagli indici di input agli indici di output.
Costruttori e distruttori | |
|---|---|
SparseFillEmptyRows (const :: tensorflow::Scope & scope, :: tensorflow::Input indices, :: tensorflow::Input values, :: tensorflow::Input dense_shape, :: tensorflow::Input default_value) |
attributi pubblici | |
|---|---|
empty_row_indicator | |
operation | |
output_indices | |
output_values | |
reverse_index_map | |
attributi pubblici
indicatore_riga_vuota
::tensorflow::Output empty_row_indicator
operazione
Operation operation
indici_di_output
::tensorflow::Output output_indices
valori_di_output
::tensorflow::Output output_values
mappa inversa dell'indice
::tensorflow::Output reverse_index_map
Funzioni pubbliche
SparseFillEmptyRows
SparseFillEmptyRows( const ::tensorflow::Scope & scope, ::tensorflow::Input indices, ::tensorflow::Input values, ::tensorflow::Input dense_shape, ::tensorflow::Input default_value )