جریان تنسور:: عملیات:: 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"
استدلال ها:
- scope: یک شی Scope
- ورودی ها: ورودی هایی که باید متصل شوند. همه شاخص های کاهش یافته باید اندازه غیر صفر داشته باشند.
- Reducation_indices: ابعادی که باید کاهش یابد. ابعاد به ترتیب مشخص شده کاهش می یابد. حذف
reduction_indices
معادل عبور از[n-1, n-2, ..., 0]
است. شاخص های منفی از-n
تا-1
پشتیبانی می شوند.
ویژگی های اختیاری (به Attrs
مراجعه کنید):
- keep_dims: اگر
True
باشد، ابعاد کاهش یافته را با طول1
حفظ کنید. - جداکننده: جداکننده ای که هنگام اتصال استفاده می شود.
برمیگرداند:
-
Output
: شکلی برابر با ورودی دارد و ابعاد آن حذف شده یا بسته بهkeep_dims
روی1
تنظیم شده است.
سازندگان و ویرانگرها | |
---|---|
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
ReduceJoin( const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, ::tensorflow::Input reduction_indices )
ReduceJoin
ReduceJoin( const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, ::tensorflow::Input reduction_indices, const ReduceJoin::Attrs & attrs )