เทนเซอร์โฟลว์:: ปฏิบัติการ:: 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)

โครงสร้าง

เทนเซอร์โฟลว์ :: 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
)