تينسورفلو :: العمليات :: UnsortedSegmentProd
#include <math_ops.h>
يحسب المنتج على طول أجزاء موتر.
ملخص
اقرأ القسم الخاص بالتجزئة للحصول على شرح للقطاعات.
هذا المعامل مشابه لمعامِل مجموع القطعة غير المصنف الموجود (هنا) . بدلاً من حساب المجموع على المقاطع ، فإنه يحسب ناتج جميع الإدخالات التي تنتمي إلى شريحة مثل:
\(output_i = {j...} data[j...]\) حيث يكون حاصل الضرب أكثر من tuples j...
مثل هذا القطاع segment_ids[j...] == i
.
على سبيل المثال:
c = tf.constant([[1,2,3,4], [5,6,7,8], [4,3,2,1]]) tf.unsorted_segment_prod(c, tf.constant([0, 1, 0]), num_segments=2) # ==> [[ 4, 6, 6, 4], # [5, 6, 7, 8]]
إذا لم يكن هناك إدخال لمعرف مقطع معين i
، فسيخرج 1.
إذا كان معرّف المقطع i
سالبًا ، فسيتم إسقاط القيمة المقابلة ، ولن يتم تضمينه في النتيجة.
الحجج:
- النطاق: كائن النطاق
- section_ids: موتر شكله هو بادئة من
data.shape
.
عائدات:
-
Output
: له نفس شكل البيانات ، باستثناء أبعادsegment_ids.rank
الأولى ، والتي يتم استبدالها ببعد واحد يحتوي علىnum_segments
الحجم.
البنائين والمدمرين | |
---|---|
UnsortedSegmentProd (const :: tensorflow::Scope & scope, :: tensorflow::Input data, :: 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
الوظائف العامة
UnsortedSegmentProd
UnsortedSegmentProd( const ::tensorflow::Scope & scope, ::tensorflow::Input data, ::tensorflow::Input segment_ids, ::tensorflow::Input num_segments )
العقدة
::tensorflow::Node * node() const
المشغل :: tensorflow :: الإدخال
operator::tensorflow::Input() const
المشغل :: Tensorflow :: Output
operator::tensorflow::Output() const
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-04-21 UTC.