تدفق التوتر:: العمليات:: ReducJoin
#include <string_ops.h>
ينضم إلى سلسلة Tensor عبر الأبعاد المحددة.
ملخص
يحسب ربط السلسلة عبر الأبعاد في السلسلة المحددة موتر الشكل [\\(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) |
الوظائف العامة | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
الهياكل | |
---|---|
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 )