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] mendefinisikan rentang pembatasan untuk data inputs . Nilai inputs dikuantisasi ke dalam rentang kuantisasi ( [0; 2^num_bits - 1] ketika narrow_range bernilai false dan [1; 2^num_bits - 1] ketika bernilai true) dan kemudian dide-kuantisasi dan dikeluarkan sebagai float dalam interval [min; max] . num_bits adalah lebar bit kuantisasi; antara 2 dan 16, inklusif.
Sebelum kuantisasi, nilai min dan max disesuaikan dengan logika berikut. Disarankan agar min <= 0 <= max . Jika 0 tidak berada dalam rentang nilai, perilakunya dapat tidak terduga: Jika 0 < min < max : min_adj = 0 dan max_adj = max - min . Jika min < max < 0 : min_adj = min - max dan max_adj = 0 Jika min <= 0 <= max : scale = (max - min) / (2^num_bits - 1) , min_adj = scale * round(min / scale) dan max_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 )