dòng chảy căng:: ôi:: FakeQuantWithMinMaxVarsPerChannel

#include <array_ops.h>

Định lượng giả tensor 'đầu vào' thuộc loại float và một trong các hình dạng: [d] ,.

Bản tóm tắt

[b, d] [b, h, w, d] thông qua các float trên mỗi kênh có hình dạng minmax [d] đến tensor 'đầu ra' có hình dạng giống như inputs .

[min; max] xác định phạm vi kẹp cho dữ liệu inputs . các giá trị inputs được lượng tử hóa thành phạm vi lượng tử hóa ( [0; 2^num_bits - 1] khi narrow_range là sai và [1; 2^num_bits - 1] khi nó đúng), sau đó khử lượng tử hóa và xuất ra dưới dạng float trong [min; max] khoảng [min; max] num_bits là độ rộng bit của lượng tử hóa; từ 2 đến 16, bao gồm.

Trước khi lượng tử hóa, các giá trị minmax được điều chỉnh theo logic sau. Nên có min <= 0 <= max . Nếu 0 không nằm trong phạm vi giá trị, hành vi có thể không mong muốn: Nếu 0 < min < max : min_adj = 0max_adj = max - min . Nếu min < max < 0 : min_adj = min - maxmax_adj = 0 . Nếu min <= 0 <= max : scale = (max - min) / (2^num_bits - 1) , min_adj = scale * round(min / scale)max_adj = max + min_adj - min .

Hoạt động này có độ dốc và do đó cho phép đào tạo các giá trị minmax .

Tranh luận:

Trả về:

Hàm tạo và hàm hủy

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)

Thuộc tính công khai

operation
outputs

Chức năng công cộng

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

Các hàm tĩnh công khai

NarrowRange (bool x)
NumBits (int64 x)

Cấu trúc

tenorflow:: ops:: FakeQuantWithMinMaxVarsPerChannel:: Attrs

Bộ cài đặt thuộc tính tùy chọn cho FakeQuantWithMinMaxVarsPerChannel .

Thuộc tính công khai

hoạt động

Operation operation

kết quả đầu ra

::tensorflow::Output outputs

Chức năng công cộng

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
)

nút

::tensorflow::Node * node() const 

toán tử::tenorflow::Đầu vào

 operator::tensorflow::Input() const 

toán tử::tenorflow::Đầu ra

 operator::tensorflow::Output() const 

Các hàm tĩnh công khai

Phạm vi hẹp

Attrs NarrowRange(
  bool x
)

NumBits

Attrs NumBits(
  int64 x
)