tensorflow :: ops :: SparseSegmentSum
#include <math_ops.h>
جمع را در امتداد بخشهای پراکنده یک سنسور محاسبه می کند.
خلاصه
برای توضیح بخشها ، قسمت تقسیم بندی را بخوانید.
مانند SegmentSum
، اما segment_ids
انتخاب زیرمجموعه ای از بعد 0 ، که توسط indices
مشخص می شود ، می تواند رتبه کمتری نسبت به بعد اول data
باشد.
مثلا:
c = tf.constant([[1,2,3,4], [-1,-2,-3,-4], [5,6,7,8]])
# Select two rows, one segment. tf.sparse_segment_sum(c, tf.constant([0, 1]), tf.constant([0, 0])) # => [[0 0 0 0]]
# Select two rows, two segment. tf.sparse_segment_sum(c, tf.constant([0, 1]), tf.constant([0, 1])) # => [[ 1 2 3 4] # [-1 -2 -3 -4]]
# Select all rows, two segments. tf.sparse_segment_sum(c, tf.constant([0, 1, 2]), tf.constant([0, 0, 1])) # => [[0 0 0 0] # [5 6 7 8]]
# Which is equivalent to: tf.segment_sum(c, tf.constant([0, 0, 1]))
استدلال ها:
- دامنه: یک شی Sc Scope
- شاخص ها: یک سنسور 1-D. دارای رتبه ای برابر با
segment_ids
. - segment_ids: یک تانسور 1-D. مقادیر باید مرتب شده و قابل تکرار باشند.
بازده:
-
Output
: همان شکل داده را دارد ، بجز بعد 0 که دارای اندازهk
، تعداد بخشها.
سازندگان و ویرانگران | |
---|---|
SparseSegmentSum (const :: tensorflow::Scope & scope, :: tensorflow::Input data, :: tensorflow::Input indices, :: tensorflow::Input segment_ids) |
صفات عمومی | |
---|---|
operation | |
output |
کارکردهای عمومی | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
صفات عمومی
عمل
Operation operation
خروجی
::tensorflow::Output output
کارکردهای عمومی
SparseSegmentSum
SparseSegmentSum( const ::tensorflow::Scope & scope, ::tensorflow::Input data, ::tensorflow::Input indices, ::tensorflow::Input segment_ids )
گره
::tensorflow::Node * node() const
عملگر :: tensorflow :: ورودی
operator::tensorflow::Input() const
عملگر :: tensorflow :: خروجی
operator::tensorflow::Output() const
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2020-04-20 بهوقت ساعت هماهنگ جهانی.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"اطلاعاتی که نیاز دارم وجود ندارد"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"بیشازحد پیچیده/ مراحل بسیار زیاد"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"قدیمی"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"مشکل ترجمه"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"مشکل کد / نمونهها"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"غیره"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"درک آسان"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"مشکلم را برطرف کرد"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"غیره"
}]