تدفق التوتر:: العمليات:: FakeQuantWithMinMaxVars

#include <array_ops.h>

قم بتكميم موتر "المدخلات" من النوع float عبر العددية العائمة العالمية min

ملخص

والحد max لموتر "المخرجات" بنفس شكل inputs .

[min; max] تحديد نطاق التثبيت لبيانات inputs . يتم تكميم قيم inputs في نطاق التكميم ( [0; 2^num_bits - 1] عندما يكون narrow_range خطأ و [1; 2^num_bits - 1] عندما يكون صحيحًا) ثم يتم إلغاء تكميمها وإخراجها كعوامات في [min; max] الفاصل الزمني. num_bits هو عرض البت للتكميم؛ بين 2 و16 شاملاً.

قبل التكميم، يتم ضبط القيم min max باستخدام المنطق التالي. يقترح أن يكون min <= 0 <= max . إذا لم يكن 0 في نطاق القيم، فمن الممكن أن يكون السلوك غير متوقع: If 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) و max_adj = max + min_adj - min .

تحتوي هذه العملية على تدرج وبالتالي تسمح بتدريب القيم min max .

الحجج:

عائدات:

  • Output : موتر المخرجات.

البنائين والمدمرين

FakeQuantWithMinMaxVars (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input min, :: tensorflow::Input max)
FakeQuantWithMinMaxVars (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input min, :: tensorflow::Input max, const FakeQuantWithMinMaxVars::Attrs & attrs)

الصفات العامة

operation
outputs

الوظائف العامة

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

وظائف ثابتة العامة

NarrowRange (bool x)
NumBits (int64 x)

الهياكل

Tensorflow:: ops:: FakeQuantWithMinMaxVars:: Attrs

محددات السمات الاختيارية لـ FakeQuantWithMinMaxVars .

الصفات العامة

عملية

Operation operation

النواتج

::tensorflow::Output outputs

الوظائف العامة

FakeQuantWithMinMaxVars

 FakeQuantWithMinMaxVars(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input inputs,
  ::tensorflow::Input min,
  ::tensorflow::Input max
)

FakeQuantWithMinMaxVars

 FakeQuantWithMinMaxVars(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input inputs,
  ::tensorflow::Input min,
  ::tensorflow::Input max,
  const FakeQuantWithMinMaxVars::Attrs & attrs
)

العقدة

::tensorflow::Node * node() const 

المشغل::tensorflow::الإدخال

 operator::tensorflow::Input() const 

المشغل::tensorflow::الإخراج

 operator::tensorflow::Output() const 

وظائف ثابتة العامة

نطاق ضيق

Attrs NarrowRange(
  bool x
)

نومبيتس

Attrs NumBits(
  int64 x
)