텐서플로우:: 연산:: 진단

#include <array_ops.h>

주어진 대각선 값을 갖는 대각 텐서를 반환합니다.

요약

diagonal 주어지면, 이 연산은 diagonal 와 나머지 모든 요소에 0을 채운 텐서를 반환합니다. 대각선 요소는 다음과 같이 계산됩니다.

diagonal 의 차원이 [D1,..., Dk]라고 가정하면 출력은 차원이 [D1,..., Dk, D1,..., Dk]인 랭크 2k 텐서가 됩니다. 여기서:

output[i1,..., ik, i1,..., ik] = diagonal[i1, ..., ik] 및 그 밖의 모든 곳에서는 0입니다.

예를 들어:

# 'diagonal' is [1, 2, 3, 4]
tf.diag(diagonal) ==> [[1, 0, 0, 0]
                       [0, 2, 0, 0]
                       [0, 0, 3, 0]
                       [0, 0, 0, 4]]

논거:

  • 범위: Scope 객체
  • 대각선: k번째 텐서 (여기서 k는 최대 1입니다).

보고:

생성자와 소멸자

Diag (const :: tensorflow::Scope & scope, :: tensorflow::Input diagonal)

공개 속성

operation
output

공공 기능

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

공개 속성

작업

Operation operation

산출

::tensorflow::Output output

공공 기능

진단

 Diag(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input diagonal
)

마디

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const