przepływ tensorowy:: ops:: SparseCrossV2

#include <sparse_ops.h>

Generuje rzadki krzyż z listy rzadkich i gęstych tensorów.

Streszczenie

Operacja ta przyjmuje dwie listy, jedną 2D SparseTensor i jedną 2D Tensor , z których każda reprezentuje cechy jednej kolumny funkcji. Generuje 2D SparseTensor z partiami krzyżującymi te funkcje.

Na przykład, jeśli dane wejściowe 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"]]

wówczas wynikiem 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 hasshed_output=true, wówczas 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 .
  • gęste_wejścia: 2-D. Kolumny reprezentowane przez gęsty Tensor .
  • sep: ciąg używany podczas dołączania do listy wejściowych ciągów znaków, może być później użyty jako separator.

Zwroty:

  • Output indeksy_wyjściowe: 2-D. Indeksy połączonego SparseTensor .
  • Output wartości_wyjściowe: 1-D. Niepuste wartości połączonego lub zaszyfrowanego SparseTensor .
  • Output kształt_wyjścia: 1-D. Kształt połączonego SparseTensor .

Konstruktory i destruktory

SparseCrossV2 (const :: tensorflow::Scope & scope, :: tensorflow::InputList indices, :: tensorflow::InputList values, :: tensorflow::InputList shapes, :: tensorflow::InputList dense_inputs, :: tensorflow::Input sep)

Atrybuty publiczne

operation
output_indices
output_shape
output_values

Atrybuty publiczne

operacja

Operation operation

indeksy_wyjściowe

::tensorflow::Output output_indices

kształt_wyjściowy

::tensorflow::Output output_shape

wartości_wyjściowe

::tensorflow::Output output_values

Funkcje publiczne

SparseCrossV2

 SparseCrossV2(
  const ::tensorflow::Scope & scope,
  ::tensorflow::InputList indices,
  ::tensorflow::InputList values,
  ::tensorflow::InputList shapes,
  ::tensorflow::InputList dense_inputs,
  ::tensorflow::Input sep
)