เทนเซอร์โฟลว์:: ปฏิบัติการ:: FakeQuantWithMinMaxVarsPerChannel
#include <array_ops.h>ปลอมปริมาณเทนเซอร์ 'อินพุต' ประเภทลอยผ่านการลอยตัวต่อช่อง
สรุป
Fake-quantize เทนเซอร์ inputs ประเภท float per-channel และหนึ่งในรูปร่าง: [d] , [b, d] [b, h, w, d] ผ่าน per-channel floats min และ max ของรูปร่าง [d] ถึง outputs เทนเซอร์ที่มีรูปร่างเดียวกันกับ 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) | |
โครงสร้าง | |
|---|---|
| เทนเซอร์โฟลว์ :: 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 )
นัมบิตส์
Attrs NumBits( int64 x )