tensorflow :: ops :: SparseCross
#include <sparse_ops.h>
Generuje rzadkie krzyżowanie z listy rzadkich i gęstych tensorów.
streszczenie
Operacja ma dwie listy, jedną 2D SparseTensor
i jedną 2D Tensor
, z których każda reprezentuje cechy jednej kolumny funkcji. SparseTensor
2D SparseTensor
z partiami krzyżowymi tych funkcji.
Na przykład, jeśli wejścia to
inputs[0]: SparseTensor with shape = [2, 2] [0, 0]: "a" [1, 0]: "b" [1, 1]: "c" inputs[1]: SparseTensor with shape = [2, 1] [0, 0]: "d" [1, 0]: "e" inputs[2]: Tensor [["f"], ["g"]]
wtedy wyjście będzie
shape = [2, 2] [0, 0]: "a_X_d_X_f" [1, 0]: "b_X_e_X_g" [1, 1]: "c_X_e_X_g"
jeśli hashed_output = true, wynikiem będzie
shape = [2, 2] [0, 0]: FingerprintCat64( Fingerprint64("f"), FingerprintCat64( Fingerprint64("d"), Fingerprint64("a"))) [1, 0]: FingerprintCat64( Fingerprint64("g"), FingerprintCat64( Fingerprint64("e"), Fingerprint64("b"))) [1, 1]: FingerprintCat64( Fingerprint64("g"), FingerprintCat64( Fingerprint64("e"), Fingerprint64("c")))
Argumenty:
- zakres: obiekt Scope
- indeksy: 2-D. Indeksy każdego wejścia
SparseTensor
. - wartości: 1-D. wartości każdego
SparseTensor
. - kształty: 1-D. Kształty każdego
SparseTensor
. - dense_inputs: 2-D. Kolumny reprezentowane przez gęsty
Tensor
. - hashed_output: Jeśli true, zwraca hash krzyża zamiast ciągu. Pozwoli nam to uniknąć manipulacji na strunach.
- num_buckets: jest używany, jeśli hashed_output ma wartość true. output = hashed_valuenum_buckets if num_buckets> 0 else hashed_value.
- hash_key: Określ hash_key, który będzie używany przez funkcję
FingerprintCat64
do łączenia odcisków palców krzyżyka.
Zwroty:
-
Output
output_indices: 2-D. Indeksy połączonegoSparseTensor
. -
Output
wartości_wyjściowe: 1-D.SparseTensor
wartości połączonego lubSparseTensor
. -
Output
output_shape: 1-D. Kształt połączonegoSparseTensor
.
Konstruktorzy i niszczyciele | |
---|---|
SparseCross (const :: tensorflow::Scope & scope, :: tensorflow::InputList indices, :: tensorflow::InputList values, :: tensorflow::InputList shapes, :: tensorflow::InputList dense_inputs, bool hashed_output, int64 num_buckets, int64 hash_key, DataType out_type, DataType internal_type) |
Atrybuty publiczne | |
---|---|
operation | |
output_indices | |
output_shape | |
output_values |
Atrybuty publiczne
operacja
Operation operation
wskaźniki_wyjściowe
::tensorflow::Output output_indices
kształt_wyjścia
::tensorflow::Output output_shape
wartości_wyjściowe
::tensorflow::Output output_values
Funkcje publiczne
SparseCross
SparseCross( const ::tensorflow::Scope & scope, ::tensorflow::InputList indices, ::tensorflow::InputList values, ::tensorflow::InputList shapes, ::tensorflow::InputList dense_inputs, bool hashed_output, int64 num_buckets, int64 hash_key, DataType out_type, DataType internal_type )