Google I/O에 참여해 주셔서 감사합니다. 주문형 모든 세션 보기 주문형 시청

tensorflow :: ops :: 가득 따르다

#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.fill 은 스칼라 콘텐츠 만 지원하는 반면 tf.constantTensor 값을 지원합니다.
  • tf.fill 은 런타임에 실제 Tensor 값을 구성하는 연산 그래프에서 Op를 생성합니다. 이것은 Const 노드가있는 그래프에 전체 Tensor 를 임베드하는 tf.constant 와 대조됩니다.
  • 때문에 tf.fill 그래프 런타임시에 평가하여, 다른 런타임 텐서 달리 형상에 기초하여 동적 지원 tf.constant .

인수 :

  • 범위 : 범위 개체
  • 희미한 : 1-D. 출력 텐서의 모양을 나타냅니다.
  • 값 : 0-D (스칼라). 반환 된 텐서를 채울 값입니다.

(numpy) 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 

연산자 :: tensorflow :: 입력

 operator::tensorflow::Input() const 

연산자 :: tensorflow :: 출력

 operator::tensorflow::Output() const