tensorflow::ops::FakeQuantWithMinMaxArgs
#include <array_ops.h>Lakukan kuantisasi semu pada tensor 'input', ubah tipe tensor 'output' menjadi float dengan tipe yang sama.
Ringkasan
Atribut
-
[min; max]menentukan rentang pembatasan untuk datainputs. - Nilai
inputsdikuantisasi ke dalam rentang kuantisasi ([0; 2^num_bits - 1]ketikanarrow_rangebernilai false dan[1; 2^num_bits - 1]ketika bernilai true) kemudian dide-kuantisasi dan dikeluarkan sebagai float dalam interval[min; max]. -
num_bitsadalah lebar bit kuantisasi; antara 2 dan 16, termasuk.
Sebelum kuantisasi, nilai min dan max disesuaikan dengan logika berikut. Disarankan agar min <= 0 <= max . Jika 0 tidak termasuk dalam rentang nilai, perilakunya dapat tidak terduga:
- Jika
0 < min < max:min_adj = 0danmax_adj = max - min. - Jika
min < max < 0:min_adj = min - maxdanmax_adj = 0. - Jika
min <= 0 <= max:scale = (max - min) / (2^num_bits - 1),min_adj = scale * round(min / scale)danmax_adj = max + min_adj - min.
Kuantisasi disebut palsu karena outputnya masih berupa bilangan floating point.
Argumen:
- Cakupan: Objek Cakupan
Mengembalikan:
-
Output: Tensor output.
Konstruktor dan Destruktor | |
|---|---|
FakeQuantWithMinMaxArgs (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs) | |
FakeQuantWithMinMaxArgs (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, const FakeQuantWithMinMaxArgs::Attrs & attrs) |
Atribut publik | |
|---|---|
operation | |
outputs | |
Fungsi publik | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
Fungsi statis publik | |
|---|---|
Max (float x) | |
Min (float x) | |
NarrowRange (bool x) | |
NumBits (int64 x) | |
Struktur | |
|---|---|
| tensorflow::ops::FakeQuantWithMinMaxArgs::Attrs | Pengaturan atribut opsional untuk FakeQuantWithMinMaxArgs . |
Atribut publik
operasi
Operation operation
keluaran
::tensorflow::Output outputs
Fungsi publik
FakeQuantWithMinMaxArgs
FakeQuantWithMinMaxArgs( const ::tensorflow::Scope & scope, ::tensorflow::Input inputs )
FakeQuantWithMinMaxArgs
FakeQuantWithMinMaxArgs( const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, const FakeQuantWithMinMaxArgs::Attrs & attrs )
simpul
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Fungsi statis publik
Maksimum
Attrs Max( float x )
Min
Attrs Min( float x )
Jangkauan Sempit
Attrs NarrowRange( bool x )
NumBits
Attrs NumBits( int64 x )