tensorflow:: אופס:: FakeQuantWithMinMaxVarsPerChannel
#include <array_ops.h>
לכמת מזויף את טנסור 'הכניסות' מסוג float ואחת הצורות: [d]
,.
תַקצִיר
[b, d]
[b, h, w, d]
באמצעות צפים לכל ערוץ min
max
של צורה [d]
ל-'outputs' טנסור בעל צורה זהה inputs
.
[min; max]
מגדירים את טווח ההידוק עבור נתוני inputs
. ערכי inputs
מקוונטים לטווח הכימות ( [0; 2^num_bits - 1]
כאשר narrow_range
הוא false ו- [1; 2^num_bits - 1]
כאשר הוא נכון) ולאחר מכן דה-קוונטיזציה ומוצאת כצף ב- [min; max]
מרווח. num_bits
הוא רוחב הסיביות של הקוונטיזציה; בין 2 ל-16, כולל.
לפני הקוונטיזציה, ערכי min
max
מותאמים לפי ההיגיון הבא. מומלץ לקבל min <= 0 <= max
. אם 0
אינו בטווח הערכים, ההתנהגות יכולה להיות בלתי צפויה: אם 0 < min < max
: min_adj = 0
ו max_adj = max - min
. אם min < max < 0
: min_adj = min - max
ו max_adj = 0
. אם min <= 0 <= max
: scale = (max - min) / (2^num_bits - 1)
, min_adj = scale * round(min / scale)
and max_adj = max + min_adj - min
.
לפעולה זו יש שיפוע ובכך מאפשרת אימון ערכי min
max
.
טיעונים:
- scope: אובייקט Scope
החזרות:
-
Output
: טנסור הפלטים.
בנאים והורסים | |
---|---|
FakeQuantWithMinMaxVarsPerChannel (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input min, :: tensorflow::Input max) | |
FakeQuantWithMinMaxVarsPerChannel (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input min, :: tensorflow::Input max, const FakeQuantWithMinMaxVarsPerChannel::Attrs & attrs) |
תפקידים ציבוריים | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
פונקציות סטטיות ציבוריות | |
---|---|
NarrowRange (bool x) | |
NumBits (int64 x) |
מבנים | |
---|---|
tensorflow:: ops:: FakeQuantWithMinMaxVarsPerChannel:: Attrs | קובעי תכונות אופציונליים עבור FakeQuantWithMinMaxVarsPerChannel . |
תכונות ציבוריות
מִבצָע
Operation operation
תפוקות
::tensorflow::Output outputs
תפקידים ציבוריים
FakeQuantWithMinMaxVarsPerChannel
FakeQuantWithMinMaxVarsPerChannel( const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, ::tensorflow::Input min, ::tensorflow::Input max )
FakeQuantWithMinMaxVarsPerChannel
FakeQuantWithMinMaxVarsPerChannel( const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, ::tensorflow::Input min, ::tensorflow::Input max, const FakeQuantWithMinMaxVarsPerChannel::Attrs & attrs )