tensorflow::ops::FakeQuantWithMinMaxVarsPerChannel

#include <array_ops.h>

ทำการควอนไทซ์ปลอมให้กับเทนเซอร์ 'อินพุต' ประเภท float และรูปร่างหนึ่ง: [d] ,.

สรุป

[b, d] [b, h, w, d] ผ่าน min และ max ของทศลอยต่อช่องสัญญาณที่มีรูปร่าง [d] ไปยังเทนเซอร์ 'เอาต์พุต' ที่มีรูปร่างเดียวกับ inputs

[min; max] กำหนดช่วงการจำกัดค่าสำหรับข้อมูล inputs ค่า inputs จะถูกควอนไทซ์ให้อยู่ในช่วงการควอนไทซ์ ( [0; 2^num_bits - 1] เมื่อ narrow_range เป็น false และ [1; 2^num_bits - 1] เมื่อเป็น true) จากนั้นจะถูกดีควอนไทซ์และส่งออกเป็นค่าทศลอยในช่วง [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 และ 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 

ตัวดำเนินการ::เทนเซอร์โฟลว์::อินพุต

 operator::tensorflow::Input() const 

ตัวดำเนินการ::เทนเซอร์โฟลว์::เอาต์พุต

 operator::tensorflow::Output() const 

ฟังก์ชันคงที่สาธารณะ

ช่วงแคบ

Attrs NarrowRange(
  bool x
)

นัมบิตส์

Attrs NumBits(
  int64 x
)