tensorflow:: אופס:: MatrixSetDiag
#include <array_ops.h>
מחזירה טנזור מטריצה אצווה עם ערכי אלכסון אצווה חדשים.
סיכום
בהינתן input
diagonal
, פעולה זו מחזירה טנזור עם אותם צורה וערכים כמו input
, למעט האלכסון הראשי של המטריצות הפנימיות ביותר. אלה יוחלפו על ידי הערכים diagonal
.
הפלט מחושב באופן הבא:
נניח input
יש מידות k+1
[I, J, K, ..., M, N]
diagonal
יש מידות k
[I, J, K, ..., min(M, N)]
. אז הפלט הוא טנזור בדרגה k+1
עם מידות [I, J, K, ..., M, N]
כאשר:
-
output[i, j, k, ..., m, n] = diagonal[i, j, k, ..., n]
עבורm == n
. -
output[i, j, k, ..., m, n] = input[i, j, k, ..., m, n]
עבורm != n
.
טיעונים:
- scope: אובייקט Scope
- קלט: דרגה
k+1
, כאשרk >= 1
. - אלכסון: דרגה
k
, כאשרk >= 1
.
החזרות:
-
Output
: דרגהk+1
, עםoutput.shape = input.shape
.
בנאים והורסים | |
---|---|
MatrixSetDiag (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input diagonal) |
תכונות ציבוריות | |
---|---|
operation | |
output |
תפקידים ציבוריים | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
תכונות ציבוריות
מבצע
Operation operation
תְפוּקָה
::tensorflow::Output output
תפקידים ציבוריים
MatrixSetDiag
MatrixSetDiag( const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input diagonal )
צוֹמֶת
::tensorflow::Node * node() const
מפעיל::tensorflow::קלט
operator::tensorflow::Input() const
אופרטור::tensorflow::פלט
operator::tensorflow::Output() const
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2023-12-01 (שעון UTC).
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"חסרים לי מידע או פרטים"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"התוכן מורכב מדי או עם יותר מדי שלבים"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"התוכן לא עדכני"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"בעיה בתרגום"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"בעיה בדוגמאות/בקוד"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"סיבה אחרת"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"התוכן קל להבנה"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"התוכן עזר לי לפתור בעיה"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"סיבה אחרת"
}]