tensorflow:: אופס:: לְהַקְצוֹת

#include <state_ops.h>

עדכן את 'ref' על ידי הקצאת 'ערך' לו.

סיכום

פעולה זו מוציאה "ref" לאחר ביצוע ההקצאה. זה מקל על שרשרת פעולות שצריכות להשתמש בערך האיפוס.

טיעונים:

  • scope: אובייקט Scope
  • ref: צריך להיות מצומת Variable . יכול להיות לא אתחול.
  • value: הערך שיש להקצות למשתנה.

מאפיינים אופציונליים (ראה Attrs ):

  • validate_shape: אם נכון, הפעולה תאמת שהצורה של 'ערך' תואמת את הצורה של ה- Tensor שאליו מוקצה. אם שקר, 'ref' יקבל צורה של 'ערך'.
  • use_locking: אם נכון, ההקצאה תהיה מוגנת על ידי מנעול; אחרת ההתנהגות אינה מוגדרת, אך עלולה להפגין פחות מחלוקת.

החזרות:

  • Output : = זהה ל-"ref". הוחזר כנוחות עבור פעולות שרוצות להשתמש בערך החדש לאחר איפוס המשתנה.

בנאים והורסים

Assign (const :: tensorflow::Scope & scope, :: tensorflow::Input ref, :: tensorflow::Input value)
Assign (const :: tensorflow::Scope & scope, :: tensorflow::Input ref, :: tensorflow::Input value, const Assign::Attrs & attrs)

תכונות ציבוריות

operation
output_ref

תפקידים ציבוריים

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

פונקציות סטטיות ציבוריות

UseLocking (bool x)
ValidateShape (bool x)

מבנים

tensorflow:: ops:: הקצה:: Attrs

מגדירי תכונות אופציונליים עבור הקצה .

תכונות ציבוריות

מבצע

Operation operation

פלט_ref

::tensorflow::Output output_ref

תפקידים ציבוריים

לְהַקְצוֹת

 Assign(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input ref,
  ::tensorflow::Input value
)

לְהַקְצוֹת

 Assign(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input ref,
  ::tensorflow::Input value,
  const Assign::Attrs & attrs
)

צוֹמֶת

::tensorflow::Node * node() const 

מפעיל::tensorflow::קלט

 operator::tensorflow::Input() const 

אופרטור::tensorflow::פלט

 operator::tensorflow::Output() const 

פונקציות סטטיות ציבוריות

השתמש בנעילה

Attrs UseLocking(
  bool x
)

ValidateShape

Attrs ValidateShape(
  bool x
)