تينسورفلو :: العمليات :: المنتج المقطع
#include <math_ops.h>
يحسب المنتج على طول أجزاء موتر.
ملخص
اقرأ القسم الخاص بالتجزئة للحصول على شرح للقطاعات.
يحسب موترًا مثل \(output_i = data_j\) حيث يكون المنتج أعلى من j
مثل تلك segment_ids[j] == i
.
إذا كان المنتج فارغًا لمعرف مقطع معين i
، فإن output[i] = 1
.
على سبيل المثال:
c = tf.constant([[1,2,3,4], [4, 3, 2, 1], [5,6,7,8]]) tf.segment_prod(c, tf.constant([0, 0, 1])) # ==> [[4, 6, 6, 4], # [5, 6, 7, 8]]
الحجج:
- النطاق: كائن النطاق
- Sector_ids: موتر 1-D حجمه يساوي حجم البُعد الأول
data
. يجب فرز القيم ويمكن تكرارها.
عائدات:
-
Output
: له نفس شكل البيانات ، باستثناء البعد 0 الذي يحتوي على الحجمk
، وهو عدد المقاطع.
البنائين والمدمرين | |
---|---|
SegmentProd (const :: tensorflow::Scope & scope, :: tensorflow::Input data, :: tensorflow::Input segment_ids) |
السمات العامة | |
---|---|
operation | |
output |
الوظائف العامة | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
السمات العامة
عملية
Operation operation
انتاج
::tensorflow::Output output
الوظائف العامة
المنتج المقطع
SegmentProd( const ::tensorflow::Scope & scope, ::tensorflow::Input data, ::tensorflow::Input segment_ids )
العقدة
::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-20 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"Translation issue"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"مشكلة في العيّنات / التعليمات البرمجية"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]