تينسورفلو :: العمليات :: دياج
#include <array_ops.h>
إرجاع موتر قطري بقيم قطرية معينة.
ملخص
بالنظر إلى diagonal
، تُرجع هذه العملية موترًا diagonal
وكل شيء آخر مبطن بالأصفار. يتم حساب القطر على النحو التالي:
افترض أن diagonal
له أبعاد [D1، ...، Dk] ، فإن الناتج هو موتر من الرتبة 2k بأبعاد [D1، ...، Dk، D1، ...، Dk] حيث
output[i1,..., ik, i1,..., ik] = diagonal[i1, ..., ik]
و 0 في كل مكان آخر.
على سبيل المثال:
# 'diagonal' is [1, 2, 3, 4] tf.diag(diagonal) ==> [[1, 0, 0, 0] [0, 2, 0, 0] [0, 0, 3, 0] [0, 0, 0, 4]]
الحجج:
- النطاق: كائن النطاق
- قطري: موتر الرتبة k حيث k هي 1 على الأكثر.
عائدات:
-
Output
: موتر الإخراج.
البنائين والمدمرين | |
---|---|
Diag (const :: tensorflow::Scope & scope, :: tensorflow::Input diagonal) |
السمات العامة | |
---|---|
operation | |
output |
الوظائف العامة | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
السمات العامة
عملية
Operation operation
انتاج
::tensorflow::Output output
الوظائف العامة
دياج
Diag( const ::tensorflow::Scope & scope, ::tensorflow::Input diagonal )
العقدة
::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"
}]