텐서플로우:: 연산:: 채우기

#include <array_ops.h>

스칼라 값으로 채워진 텐서를 생성합니다.

요약

이 연산은 dims 형태의 텐서를 생성하고 해당 텐서를 value 으로 채웁니다.

예를 들어:

# Output tensor has shape [2, 3].
fill([2, 3], 9) ==> [[9, 9, 9]
                     [9, 9, 9]]

tf.fill tf.constant 와 몇 가지 점에서 다릅니다.

  • tf.fill 스칼라 값만 지원하는 반면, tf.constant 텐서 값을 지원합니다.
  • tf.fill 런타임에 실제 텐서 값을 구성하는 연산(Op)을 계산 그래프에 생성합니다. 이는 전체 텐서를 Const 노드를 통해 그래프에 직접 삽입하는 tf.constant 와는 대조적입니다.
  • tf.fill 그래프 런타임에 평가되므로 tf.constant 와 달리 다른 런타임 텐서를 기반으로 하는 동적 모양을 지원합니다.

논거:

  • 범위: Scope 객체
  • dims: 1차원. 출력 텐서의 형태를 나타냅니다.
  • 값: 0차원(스칼라). 반환되는 텐서를 채울 값입니다.

(넘파이) np.full과 동일

보고:

생성자와 소멸자

Fill (const :: tensorflow::Scope & scope, :: tensorflow::Input dims, :: tensorflow::Input value)

공개 속성

operation
output

공공 기능

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

공개 속성

작업

Operation operation

산출

::tensorflow::Output output

공공 기능

채우다

 Fill(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input dims,
  ::tensorflow::Input value
)

마디

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const