텐서플로우:: 작전:: 매트릭스 진단 부품

#include <array_ops.h>

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

요약

이 작업은 일괄 inputdiagonal 부분이 포함된 텐서를 반환합니다. diagonal 부분은 다음과 같이 계산됩니다.

input k 차원 [I, J, K, ..., M, N] 이 있다고 가정하면 출력은 차원 [I, J, K, ..., min(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 >= 2 인 순위 k 텐서.

보고:

  • 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 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const