tensorflow :: ops :: FakeQuantWithMinMaxVars
#include <array_ops.h>
Kuantisasi palsu tensor 'input' tipe float melalui skalar float global min
Ringkasan
dan tensor max
ke 'keluaran' yang bentuknya sama dengan inputs
.
[min; max]
menentukan rentang penjepitan untuk data inputs
. nilai inputs
dikuantisasi ke dalam rentang kuantisasi ( [0; 2^num_bits - 1]
jika narrow_range
salah dan [1; 2^num_bits - 1]
jika benar) dan kemudian [1; 2^num_bits - 1]
-kuantisasi dan keluaran sebagai float dalam [min; max]
interval. num_bits
adalah num_bits
kuantisasi; antara 2 dan 16, inklusif.
Sebelum penghitungan, nilai min
dan max
disesuaikan dengan logika berikut. Disarankan untuk memiliki min <= 0 <= max
. Jika 0
tidak dalam rentang nilai, perilaku 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
.
Operasi ini memiliki gradien sehingga memungkinkan untuk melatih nilai min
dan max
.
Argumen:
- scope: Objek Scope
Pengembalian:
-
Output
: Tensor keluaran.
Pembuat dan Penghancur | |
---|---|
FakeQuantWithMinMaxVars (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input min, :: tensorflow::Input max) | |
FakeQuantWithMinMaxVars (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input min, :: tensorflow::Input max, const FakeQuantWithMinMaxVars::Attrs & attrs) |
Atribut publik | |
---|---|
operation | |
outputs |
Fungsi publik | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
Fungsi statis publik | |
---|---|
NarrowRange (bool x) | |
NumBits (int64 x) |
Structs | |
---|---|
tensorflow :: ops :: FakeQuantWithMinMaxVars :: Attrs | Penyetel atribut opsional untuk FakeQuantWithMinMaxVars . |
Atribut publik
operasi
Operation operation
keluaran
::tensorflow::Output outputs
Fungsi publik
FakeQuantWithMinMaxVars
FakeQuantWithMinMaxVars( const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, ::tensorflow::Input min, ::tensorflow::Input max )
FakeQuantWithMinMaxVars
FakeQuantWithMinMaxVars( const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, ::tensorflow::Input min, ::tensorflow::Input max, const FakeQuantWithMinMaxVars::Attrs & attrs )
simpul
::tensorflow::Node * node() const
operator :: tensorflow :: Input
operator::tensorflow::Input() const
operator :: tensorflow :: Keluaran
operator::tensorflow::Output() const
Fungsi statis publik
NarrowRange
Attrs NarrowRange( bool x )
NumBits
Attrs NumBits( int64 x )