tensorflow:: ops:: SparseAdd

#include <sparse_ops.h>

يضيف كائنين من SparseTensor لإنتاج SparseTensor آخر.

ملخص

يُفترض أن تكون فهارس كائنات SparseTensor المُدخلة مُرتبةً وفقًا للترتيب المعجمي القياسي. إذا لم يكن الأمر كذلك، فقم بتشغيل SparseReorder قبل هذه الخطوة لاستعادة ترتيب الفهارس.

افتراضيًا، إذا كان مجموع قيمتين يساوي صفرًا عند فهرس معين، فإنّ مُخرَج SparseTensor سيظلّ يتضمن ذلك الموقع المحدد في فهرسه، ويخزّن صفرًا في خانة القيمة المقابلة. لتجاوز هذا، يمكن للمُستدعين تحديد thresh ، مما يشير إلى أنه إذا كان مجموع القيمتين أصغر من thresh ، فلن يتم تضمين قيمتهما وفهرسهما. على وجه الخصوص، thresh == 0 (القيمة الافتراضية) تعني الاحتفاظ بكل شيء، ويتم تطبيق العتبة الفعلية فقط على القيم الموجبة.

في الأشكال التالية، يمثل nnz العدد بعد أخذ thresh في الاعتبار.

الحجج:

  • النطاق: كائن النطاق
  • a_indices: 2-D. indices المصفوفة SparseTensor الأولى، حجمها [nnz, ndims] .
  • a_values: 1-D. values المتجه الأول SparseTensor ، حجمه [nnz] .
  • a_shape: 1-D. shape SparseTensor الأول، حجم [ndims] متجه.
  • b_indices: 2-D. indices المصفوفة SparseTensor الثانية، حجمها [nnz, ndims] .
  • b_values: 1-D. values المتجه SparseTensor الثاني، حجمه [nnz] .
  • b_shape: 1-D. shape SparseTensor الثاني، حجم [ndims] متجه.
  • العتبة: 0-D. عتبة الحجم التي تحدد ما إذا كان زوج قيمة الإخراج/الفهرس يشغل مساحة أم لا.

المرتجعات:

  • Output مجموع المؤشرات
  • مجموع القيم Output
  • مجموع_الشكل Output

البناة والمدمرون

SparseAdd (const :: tensorflow::Scope & scope, :: tensorflow::Input a_indices, :: tensorflow::Input a_values, :: tensorflow::Input a_shape, :: tensorflow::Input b_indices, :: tensorflow::Input b_values, :: tensorflow::Input b_shape, :: tensorflow::Input thresh)

السمات العامة

operation
sum_indices
sum_shape
sum_values

السمات العامة

عملية

Operation operation

مجموع_المؤشرات

::tensorflow::Output sum_indices

شكل_المجموع

::tensorflow::Output sum_shape

مجموع_القيم

::tensorflow::Output sum_values

الوظائف العامة

إضافة متفرقة

 SparseAdd(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input a_indices,
  ::tensorflow::Input a_values,
  ::tensorflow::Input a_shape,
  ::tensorflow::Input b_indices,
  ::tensorflow::Input b_values,
  ::tensorflow::Input b_shape,
  ::tensorflow::Input thresh
)