تينسورفلو :: العمليات :: ماتريكس
#include <array_ops.h>
تُرجع الجزء القطري المُجمع من موتر مُجمع.
ملخص
تُرجع هذه العملية موترًا بالجزء diagonal
من input
المجمعة. يتم حساب الجزء diagonal
النحو التالي:
افترض أن input
لها أبعاد k
[I, J, K, ..., M, N]
، ثم يكون الناتج موترًا من الرتبة k - 1
بأبعاد [I, J, K, ..., min(M, N)]
حيث:
diagonal[i, j, k, ..., n] = input[i, j, k, ..., n, n]
.
يجب أن يكون الإدخال مصفوفة على الأقل.
على سبيل المثال:
# 'input' is [[[1, 0, 0, 0] [0, 2, 0, 0] [0, 0, 3, 0] [0, 0, 0, 4]], [[5, 0, 0, 0] [0, 6, 0, 0] [0, 0, 7, 0] [0, 0, 0, 8]]]
and input.shape = (2, 4, 4)
tf.matrix_diag_part(input) ==> [[1, 2, 3, 4], [5, 6, 7, 8]]
which has shape (2, 4)
الحجج:
- النطاق: كائن النطاق
- الإدخال: موتر الرتبة
k
حيثk >= 2
.
عائدات:
-
Output
: القطر (الأقطار) المستخرجة التي لها شكلdiagonal.shape = input.shape[:-2] + [min(input.shape[-2:])]
.
البنائين والمدمرين | |
---|---|
MatrixDiagPart (const :: tensorflow::Scope & scope, :: tensorflow::Input input) |
السمات العامة | |
---|---|
diagonal | |
operation |
الوظائف العامة | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
السمات العامة
قطري
::tensorflow::Output diagonal
عملية
Operation operation
الوظائف العامة
ماتريكس
MatrixDiagPart( const ::tensorflow::Scope & scope, ::tensorflow::Input input )
العقدة
::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"
}]