جریان تنسور:: عملیات:: 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
)

گره

::tensorflow::Node * node() const 

عملگر::tensorflow::ورودی

 operator::tensorflow::Input() const 

عملگر::tensorflow::خروجی

 operator::tensorflow::Output() const 

توابع استاتیک عمومی

KeepDims

Attrs KeepDims(
  bool x
)

جداکننده

Attrs Separator(
  StringPiece x
)