از اینکه با Google I/O تنظیم کردید متشکریم. مشاهده همه جلسات در صورت تقاضا تماشا کنید

tensorflow :: ops :: SparseSegmentSumWithNumSegment ها

#include <math_ops.h>

جمع را در امتداد بخشهای پراکنده یک سنسور محاسبه می کند.

خلاصه

مانند SparseSegmentSum ، اما شناسه های گمشده را در segment_ids اجازه می دهد. اگر یک شناسه اشتباه باشد ، سنسور output در آن موقعیت صفر می شود.

برای توضیح بخشها ، قسمت تقسیم بندی را بخوانید.

مثلا:

c = tf.constant([[1,2,3,4], [-1,-2,-3,-4], [5,6,7,8]])

tf.sparse_segment_sum_with_num_segments(
    c, tf.constant([0, 1]), tf.constant([0, 0]), num_segments=3)
# => [[0 0 0 0]
#     [0 0 0 0]
#     [0 0 0 0]]

tf.sparse_segment_sum_with_num_segments(c,
                                        tf.constant([0, 1]),
                                        tf.constant([0, 2],
                                        num_segments=4))
# => [[ 1  2  3  4]
#     [ 0  0  0  0]
#     [-1 -2 -3 -4]
#     [ 0  0  0  0]]

استدلال ها:

  • دامنه: یک شی Sc Scope
  • شاخص ها: یک سنسور 1-D. دارای رتبه ای برابر با segment_ids .
  • segment_ids: یک تانسور 1-D. مقادیر باید مرتب شده و قابل تکرار باشند.
  • num_segment ها: باید با تعداد شناسه های متمایز بخش برابر باشد.

بازده:

  • Output : دارای شکل مشابه داده است ، به جز بعد 0 که دارای اندازه num_segments .

سازندگان و ویرانگران

SparseSegmentSumWithNumSegments (const :: tensorflow::Scope & scope, :: tensorflow::Input data, :: tensorflow::Input indices, :: tensorflow::Input segment_ids, :: tensorflow::Input num_segments)

صفات عمومی

operation
output

کارکردهای عمومی

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

صفات عمومی

عمل

Operation operation

خروجی

::tensorflow::Output output

کارکردهای عمومی

SparseSegmentSumWithNumSegment ها

 SparseSegmentSumWithNumSegments(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input data,
  ::tensorflow::Input indices,
  ::tensorflow::Input segment_ids,
  ::tensorflow::Input num_segments
)

گره

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const