نشكرك على متابعة Google I / O. عرض جميع الجلسات عند الطلب مشاهدة عند الطلب

تينسورفلو :: العمليات :: FakeQuantWithMinMaxArgs

#include <array_ops.h>

تكميم موتر "المدخلات" وهمية ، اكتب تعويم إلى موتر "المخرجات" من نفس النوع.

ملخص

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

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

يُطلق على التكميم اسم وهمية لأن الناتج لا يزال في النقطة العائمة.

الحجج:

عائدات:

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

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

FakeQuantWithMinMaxArgs (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs)
FakeQuantWithMinMaxArgs (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, const FakeQuantWithMinMaxArgs::Attrs & attrs)

السمات العامة

operation
outputs

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

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

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

Max (float x)
Min (float x)
NarrowRange (bool x)
NumBits (int64 x)

الهياكل

tensorflow :: ops :: FakeQuantWithMinMaxArgs :: Attrs

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

السمات العامة

عملية

Operation operation

النواتج

::tensorflow::Output outputs

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

FakeQuantWithMinMaxArgs

 FakeQuantWithMinMaxArgs(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input inputs
)

FakeQuantWithMinMaxArgs

 FakeQuantWithMinMaxArgs(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input inputs,
  const FakeQuantWithMinMaxArgs::Attrs & attrs
)

العقدة

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

المشغل :: Tensorflow :: Output

 operator::tensorflow::Output() const 

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

الأعلى

Attrs Max(
  float x
)

دقيقة

Attrs Min(
  float x
)

نطاق ضيق

Attrs NarrowRange(
  bool x
)

نومبيتس

Attrs NumBits(
  int64 x
)