テンソルフロー::作戦::埋める

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

引数:

  • スコープ:スコープオブジェクト
  • 寸法: 1-D。出力テンソルの形状を表します。
  • 値: 0 ~ D (スカラー)。返されたテンソルを満たす値。

(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 

演算子::tensorflow::入力

 operator::tensorflow::Input() const 

演算子::tensorflow::出力

 operator::tensorflow::Output() const