تدفق التوتر:: العمليات:: ReducJoin

#include <string_ops.h>

ينضم إلى سلسلة Tensor عبر الأبعاد المحددة.

ملخص

يحسب ربط السلسلة عبر الأبعاد في السلسلة المحددة Tensor of Shape [\\(d_0, d_1, ..., d_{n-1}\\)] . إرجاع Tensor جديد تم إنشاؤه عن طريق ربط سلاسل الإدخال بالفاصل المحدد (الافتراضي: سلسلة فارغة). يتم عد المؤشرات السالبة بشكل عكسي من النهاية، حيث -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

محددات السمات الاختيارية لـ ReducJoin .

الصفات العامة

عملية

Operation operation

انتاج

::tensorflow::Output output

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

ReducJoin

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

ReducJoin

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

العقدة

::tensorflow::Node * node() const 

المشغل::tensorflow::الإدخال

 operator::tensorflow::Input() const 

المشغل::tensorflow::الإخراج

 operator::tensorflow::Output() const 

وظائف ثابتة العامة

KeepDims

Attrs KeepDims(
  bool x
)

فاصل

Attrs Separator(
  StringPiece x
)