Tensorflow :: ops :: Füllen
#include <array_ops.h>
Erstellt einen Tensor, der mit einem Skalarwert gefüllt ist.
Zusammenfassung
Diese Operation erzeugt einen Tensor von dims
und füllt ihn mit value
.
Beispielsweise:
# Output tensor has shape [2, 3]. fill([2, 3], 9) ==> [[9, 9, 9] [9, 9, 9]]
tf.fill
unterscheidet sich von tf.constant
in einigen tf.constant
:
-
tf.fill
unterstützt nur skalare Inhalt, währendtf.constant
unterstützt Tensor Werte. -
tf.fill
schafft eine Op in der Berechnung Graph, der den tatsächlichen Konstrukte Tensor - Wertes während der Laufzeit. Dies steht im Gegensatz zutf.constant
dem der gesamte Tensor mit einemConst
Knoten in den Graphentf.constant
. - Da
tf.fill
zur Laufzeit destf.fill
ausgewertet wird, werden im Gegensatz zutf.constant
dynamische Formen unterstützt, die auf anderen Laufzeit-Tensorentf.constant
.
Argumente:
- scope: Ein Scope- Objekt
- Abmessungen: 1-D. Repräsentiert die Form des Ausgangstensors.
- Wert: 0-D (skalar). Wert zum Füllen des zurückgegebenen Tensors.
(numpy) Entspricht np.full
Kehrt zurück:
-
Output
: Der Ausgangstensor.
Konstruktoren und Destruktoren | |
---|---|
Fill (const :: tensorflow::Scope & scope, :: tensorflow::Input dims, :: tensorflow::Input value) |
Öffentliche Attribute | |
---|---|
operation | |
output |
Öffentliche Funktionen | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
Öffentliche Attribute
Operation
Operation operation
Ausgabe
::tensorflow::Output output
Öffentliche Funktionen
Füllen
Fill( const ::tensorflow::Scope & scope, ::tensorflow::Input dims, ::tensorflow::Input value )
Knoten
::tensorflow::Node * node() const
operator :: tensorflow :: Input
operator::tensorflow::Input() const
operator :: tensorflow :: Output
operator::tensorflow::Output() const