tensorflow :: ops :: Doldur
#include <array_ops.h>
Skaler bir değerle dolu bir tensör oluşturur.
Özet
Bu işlem, bir şekil dims
yaratır ve onu value
doldurur.
Örneğin:
# Output tensor has shape [2, 3]. fill([2, 3], 9) ==> [[9, 9, 9] [9, 9, 9]]
tf.fill
, tf.constant
birkaç yönden farklıdır:
-
tf.fill
yalnızca skaler içerikleri desteklerken,tf.constant
Tensor değerlerini destekler. -
tf.fill
, çalışma zamanında gerçek Tensor değerini oluşturan hesaplama grafiğinde birtf.fill
oluşturur. Bu zıttırtf.constant
tüm gömer Tensörü bir ile grafik halindeConst
düğümü. -
tf.fill
, grafik çalışma zamanında değerlendirme yaptığı için,tf.constant
aksine diğer çalışma zamanı Tensörlerine dayalı dinamik şekilleri destekler.
Argümanlar:
- kapsam: Bir Scope nesnesi
- boyutlar: 1-D. Çıkış tensörünün şeklini temsil eder.
- değer: 0-D (skaler). Döndürülen tensörü dolduracak değer.
(numpy) np.full ile eşdeğerdir
İadeler:
-
Output
: Çıkış tensörü.
Yapıcılar ve Yıkıcılar | |
---|---|
Fill (const :: tensorflow::Scope & scope, :: tensorflow::Input dims, :: tensorflow::Input value) |
Genel özellikler | |
---|---|
operation | |
output |
Kamusal işlevler | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
Genel özellikler
operasyon
Operation operation
çıktı
::tensorflow::Output output
Kamusal işlevler
Doldur
Fill( const ::tensorflow::Scope & scope, ::tensorflow::Input dims, ::tensorflow::Input value )
düğüm
::tensorflow::Node * node() const
operator :: tensorflow :: Girdi
operator::tensorflow::Input() const
operator :: tensorflow :: Çıktı
operator::tensorflow::Output() const