tensorflow::ops::ReduceJoin

#include <string_ops.h>

يقوم بربط سلسلة نصية عبر الأبعاد المحددة.

ملخص

يحسب عملية دمج السلاسل عبر الأبعاد في موتر السلسلة المعطى ذي الشكل [\\(d_0, d_1, ..., d_{n-1}\\)] هذه الدالة موترًا جديدًا ناتجًا عن دمج سلاسل الإدخال باستخدام الفاصل المُعطى (الفاصل الافتراضي: سلسلة فارغة). تُحسب الفهارس السالبة تنازليًا من النهاية، حيث يُعادل -1 القيمة n - 1 إذا لم تُحدد الفهارس، فسيتم الدمج عبر جميع الأبعاد بدءًا من n - 1 وحتى 0 .

على سبيل المثال:

# tensor `a` is [["a", "b"], ["c", "d"]]
tf.reduce_join(a, 0) ==> ["ac", "bd"]
tf.reduce_join(a, 1) ==> ["ab", "cd"]
tf.reduce_join(a, -2) = tf.reduce_join(a, 0) ==> ["ac", "bd"]
tf.reduce_join(a, -1) = tf.reduce_join(a, 1) ==> ["ab", "cd"]
tf.reduce_join(a, 0, keep_dims=True) ==> [["ac", "bd"]]
tf.reduce_join(a, 1, keep_dims=True) ==> [["ab"], ["cd"]]
tf.reduce_join(a, 0, separator=".") ==> ["a.c", "b.d"]
tf.reduce_join(a, [0, 1]) ==> "acbd"
tf.reduce_join(a, [1, 0]) ==> "abcd"
tf.reduce_join(a, []) ==> [["a", "b"], ["c", "d"]]
tf.reduce_join(a) = tf.reduce_join(a, [1, 0]) ==> "abcd"

الحجج:

  • النطاق: كائن النطاق
  • المدخلات: المدخل المراد ضمه. يجب أن يكون حجم جميع الفهارس المختزلة غير صفري.
  • مؤشرات_الاختزال: الأبعاد المراد اختزالها. يتم اختزال الأبعاد بالترتيب المحدد. حذف reduction_indices يُعادل تمرير [n-1, n-2, ..., 0] . المؤشرات السالبة من -n إلى -1 مدعومة.

السمات الاختيارية (انظر Attrs ):

  • keep_dims: إذا كانت True ، فاحتفظ بالأبعاد المخفضة بطول 1 .
  • الفاصل: الفاصل الذي يُستخدم عند الربط.

المرتجعات:

  • Output : له شكل مساوٍ لشكل المدخلات مع إزالة الأبعاد المخفضة أو تعيينها إلى 1 اعتمادًا على keep_dims .

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

ReduceJoin (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input reduction_indices)
ReduceJoin (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input reduction_indices, const ReduceJoin::Attrs & attrs)

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

operation
output

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

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

الدوال الثابتة العامة

KeepDims (bool x)
Separator (StringPiece x)

الهياكل

tensorflow:: ops:: ReduceJoin:: Attrs

مُعدِّلات السمات الاختيارية لـ ReduceJoin .

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

عملية

Operation operation

المخرجات

::tensorflow::Output output

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

تقليل الانضمام

 ReduceJoin(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input inputs,
  ::tensorflow::Input reduction_indices
)

تقليل الانضمام

 ReduceJoin(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input inputs,
  ::tensorflow::Input reduction_indices,
  const ReduceJoin::Attrs & attrs
)

العقدة

::tensorflow::Node * node() const 

operator::tensorflow::Input

 operator::tensorflow::Input() const 

operator::tensorflow::Output

 operator::tensorflow::Output() const 

الدوال الثابتة العامة

KeepDims

Attrs KeepDims(
  bool x
)

فاصل

Attrs Separator(
  StringPiece x
)