tensorflow :: ops :: DiagPart
#include <array_ops.h>
텐서의 대각선 부분을 반환합니다.
요약
이 연산은 input
의 diagonal
부분이있는 텐서를 반환합니다. diagonal
부분은 다음과 같이 계산됩니다.
input
에 [D1,..., Dk, D1,..., Dk]
차원이 있다고 가정하면 출력은 차원이 [D1,..., Dk]
인 순위 k
의 텐서입니다.
diagonal[i1,..., ik] = input[i1, ..., ik, i1,..., ik]
.
예를 들면 :
# 'input' is [[1, 0, 0, 0] [0, 2, 0, 0] [0, 0, 3, 0] [0, 0, 0, 4]]
tf.diag_part(input) ==> [1, 2, 3, 4]
인수 :
- 범위 : 범위 개체
- 입력 : 순위 k 텐서 여기서 k는 짝수이고 0이 아닙니다.
보고:
-
Output
: 추출 된 대각선.
생성자와 소멸자 | |
---|---|
DiagPart (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
공공 기능
DiagPart
DiagPart( const ::tensorflow::Scope & scope, ::tensorflow::Input input )
마디
::tensorflow::Node * node() const
연산자 :: tensorflow :: 입력
operator::tensorflow::Input() const
연산자 :: tensorflow :: 출력
operator::tensorflow::Output() const