텐서플로우:: ops:: MatrixDiagPart

#include <array_ops.h>

배치 처리된 텐서의 배치 처리된 대각선 부분을 반환합니다.

요약

이 연산은 일괄 처리된 input 의 diagonal 부분을 포함하는 텐서를 반환합니다. diagonal 부분은 다음과 같이 계산됩니다.

input k 차원 [I, J, K, ..., M, N] 을 가진다고 가정하면, 출력은 차원이 [I, J, K, ..., min(M, N)] 인 k - 1 랭크 텐서입니다. 여기서:

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)

논거:

  • 범위: Scope 객체
  • 입력: 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

 MatrixDiagPart(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input
)

마디

::tensorflow::Node * node() const 

연산자::텐서플로우::입력

 operator::tensorflow::Input() const 

연산자::텐서플로우::출력

 operator::tensorflow::Output() const