tensorflow:: ops:: SparseCross

#include <sparse_ops.h>

يقوم بتوليد مصفوفة متقاطعة متفرقة من قائمة من الموترات المتفرقة والكثيفة.

ملخص

تأخذ العملية قائمتين، إحداهما من نوع SparseTensor ثنائي الأبعاد والأخرى من نوع Tensor ثنائي الأبعاد، تمثل كل منهما خصائص عمود خصائص واحد. وتُخرج العملية 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")))

الحجج:

  • النطاق: كائن النطاق
  • المؤشرات: ثنائية الأبعاد. مؤشرات كل موتر SparseTensor مُدخل.
  • القيم: 1-D. قيم كل SparseTensor .
  • الأشكال: 1-D. أشكال كل SparseTensor .
  • dense_inputs: أعمدة ثنائية الأبعاد ممثلة بواسطة Tensor كثيف.
  • hashed_output: إذا كانت القيمة صحيحة، فسيتم إرجاع قيمة التجزئة للعلامة المتقاطعة بدلاً من السلسلة النصية. وهذا سيسمح لنا بتجنب عمليات معالجة السلاسل النصية.
  • num_buckets: يُستخدم هذا المتغير إذا كانت قيمة hashed_output صحيحة. output = hashed_valuenum_buckets إذا كانت قيمة num_buckets أكبر من صفر، وإلا فإن قيمة hashed_value هي القيمة المُستخدمة.
  • hash_key: حدد مفتاح التجزئة الذي ستستخدمه وظيفة FingerprintCat64 لدمج بصمات الأصابع المتقاطعة.

المرتجعات:

  • 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

شكل الإخراج

::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
)