جریان تنسور:: عملیات:: FakeQuantWithMinMaxVarsPerChannel

#include <array_ops.h>

تانسور «ورودی‌ها» از نوع شناور و یکی از اشکال: [d] , را کوانتیزه کنید.

خلاصه

[b, d] [b, h, w, d] از طریق شناورهای هر کانال min و max شکل [d] به تانسور «خروجی» همان شکل 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 در محدوده مقادیر نباشد، رفتار می تواند غیرمنتظره باشد: اگر 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 : تانسور خروجی.

سازندگان و ویرانگرها

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)

صفات عمومی

operation
outputs

توابع عمومی

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
)

گره

::tensorflow::Node * node() const 

عملگر::tensorflow::ورودی

 operator::tensorflow::Input() const 

عملگر::tensorflow::خروجی

 operator::tensorflow::Output() const 

توابع استاتیک عمومی

محدوده باریک

Attrs NarrowRange(
  bool x
)

NumBits

Attrs NumBits(
  int64 x
)