Google I/O에 참여해 주셔서 감사합니다. 주문형 모든 세션 보기 주문형 시청

tensorflow :: ops :: SparseCross

#include <sparse_ops.h>

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

요약

연산은 2D SparseTensor 중 하나와 2D Tensor 중 하나의 두 목록을 취하며, 각각은 하나의 특성 열의 특성을 나타냅니다. 이러한 기능의 SparseTensor 교차가 포함 된 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 모양.
  • density_inputs : 2-D. 조밀 한 Tensor 표현되는 열.
  • hashed_output : true 인 경우 문자열 대신 십자가의 해시를 반환합니다. 이렇게하면 문자열 조작을 피할 수 있습니다.
  • num_buckets : hashed_output이 true 인 경우 사용됩니다. output = hashed_valuenum_buckets if num_buckets> 0 else hashed_value.
  • hash_key : Crosses FingerprintCat64 을 결합하기 위해 FingerprintCat64 함수에서 사용할 hash_key를 지정합니다.

보고:

  • Output output_indices : 2-D. 연결된 SparseTensor 인덱스입니다.
  • Output output_values ​​: 1-D. 연결되거나 해시 된 SparseTensor 의 비어 있지 않은 값입니다.
  • Output output_shape : 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

output_shape

::tensorflow::Output output_shape

출력 _ 값

::tensorflow::Output output_values

공공 기능

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
)