텐서플로우:: 작전:: 스파스 크로스

#include <sparse_ops.h>

희소 및 조밀 텐서 목록에서 희소 교차를 생성합니다.

요약

이 작업은 2D SparseTensor 중 하나와 2D Tensor 중 하나, 각각 하나의 특성 열의 특성을 나타내는 두 개의 목록을 사용합니다. 이러한 기능의 배치별 교차를 사용하여 2D SparseTensor 출력합니다.

예를 들어 입력이

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"]]
인 경우

그러면 출력은

shape = [2, 2]
[0, 0]: "a_X_d_X_f"
[1, 0]: "b_X_e_X_g"
[1, 1]: "c_X_e_X_g"
가 됩니다.

hashed_output=true이면 출력은

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")))
입니다.

인수:

  • 범위: 범위 개체
  • 인덱스: 2-D. 각 입력 SparseTensor 의 인덱스입니다.
  • 값: 1-D. 각 SparseTensor 의 값.
  • 모양: 1-D. 각 SparseTensor 의 모양.
  • dark_inputs: 2-D. Dense Tensor 로 표현되는 열.
  • hashed_output: true인 경우 문자열 대신 십자가의 해시를 반환합니다. 이렇게 하면 문자열 조작을 피할 수 있습니다.
  • num_buckets: hashed_output이 true인 경우에 사용됩니다. 출력 = hashed_valuenum_buckets if num_buckets > 0 else hashed_value.
  • hash_key: FingerprintCat64 함수에서 십자형 지문을 결합하는 데 사용할 hash_key를 지정합니다.

보고:

  • Output 출력_인덱스: 2-D. 연결된 SparseTensor 의 인덱스입니다.
  • Output 출력_값: 1-D. 연결되거나 해시된 SparseTensor 의 비어 있지 않은 값입니다.
  • Output 출력_모양: 1-D. 연결된 SparseTensor 의 모양입니다.

생성자와 소멸자

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)

공개 속성

operation
output_indices
output_shape
output_values

공개 속성

작업

Operation operation

출력_인덱스

::tensorflow::Output output_indices

출력_모양

::tensorflow::Output output_shape

출력_값

::tensorflow::Output output_values

공공 기능

스파스 크로스

 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
)