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.constantテンソル値をサポートします。
  • tf.fill 、実行時に実際のTensor値を構築する Op を計算グラフ内に作成します。これは、 Tensor全体をConstノードでグラフに埋め込むtf.constantとは対照的です。
  • tf.fillグラフ実行時に評価されるため、 tf.constantとは異なり、他の実行時テンソルに基づく動的な形状をサポートします。

議論:

  • スコープ:スコープオブジェクト
  • dims: 1次元。出力テンソルの形状を表します。
  • value: 0次元(スカラー)。返されるテンソルを埋める値。

(numpy) np.full と同等

返品:

  • Output :出力テンソル。

コンストラクターとデストラクタ

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

 operator::tensorflow::Input() const 

operator::tensorflow::Output

 operator::tensorflow::Output() const