텐서플로우:: ops:: SparseCross
#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")))논거:
- 범위: Scope 객체
- 인덱스: 2차원. 각 입력
SparseTensor의 인덱스. - 값: 1차원. 각
SparseTensor의 값. - 모양: 1차원. 각
SparseTensor의 모양. - dense_inputs: 2차원. 열은 밀집
Tensor로 표현됩니다. - hashed_output: true로 설정하면 문자열 대신 십자말풀이의 해시값을 반환합니다. 이렇게 하면 문자열 조작을 피할 수 있습니다.
- num_buckets: hashed_output이 true인 경우에 사용됩니다. output = hashed_value / num_buckets (num_buckets > 0인 경우) 또는 hashed_value (num_buckets > 0인 경우)
- hash_key:
FingerprintCat64함수가 교차 지문을 결합하는 데 사용할 hash_key를 지정합니다.
보고:
-
Outputoutput_indices: 2차원. 연결된SparseTensor의 인덱스. -
Outputoutput_values: 1차원. 연결되거나 해시된SparseTensor의 비어 있지 않은 값입니다. -
Outputoutput_shape: 1차원. 연결된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 )