tensorflow:: ops:: FakeQuantWithMinMaxArgs
#include <array_ops.h>Fałszywie kwantyzuj tensor „wejściowy”, wpisz float do tensora „wyjściowego” tego samego typu.
Streszczenie
Atrybuty [min; max] definiują zakres zaciskania dla danych inputs . Wartości inputs są kwantyzowane do zakresu kwantyzacji ( [0; 2^num_bits - 1] , gdy narrow_range ma wartość false i [1; 2^num_bits - 1] , gdy ma wartość true), a następnie dekwantyzowane i wyprowadzane jako liczby zmiennoprzecinkowe w przedziale [min; max] . num_bits to szerokość bitowa kwantyzacji; od 2 do 16 włącznie.
Przed kwantyzacją wartości min i max są dostosowywane zgodnie z następującą logiką. Sugeruje się min <= 0 <= max . Jeśli 0 nie mieści się w zakresie wartości, zachowanie może być nieoczekiwane: Jeśli 0 < min < max : min_adj = 0 i max_adj = max - min . Jeśli min < max < 0 : min_adj = min - max i max_adj = 0 Jeśli min <= 0 <= max : scale = (max - min) / (2^num_bits - 1) , min_adj = scale * round(min / scale) i max_adj = max + min_adj - min .
Kwantowanie nazywane jest fałszywą, ponieważ dane wyjściowe są nadal zmiennoprzecinkowe.
Argumenty:
- zakres: obiekt zakresu
Zwroty:
-
Output: Tensor wyjściowy.
Konstruktory i destruktory | |
|---|---|
FakeQuantWithMinMaxArgs (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs) | |
FakeQuantWithMinMaxArgs (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, const FakeQuantWithMinMaxArgs::Attrs & attrs) |
Atrybuty publiczne | |
|---|---|
operation | |
outputs | |
Funkcje publiczne | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
Publiczne funkcje statyczne | |
|---|---|
Max (float x) | |
Min (float x) | |
NarrowRange (bool x) | |
NumBits (int64 x) | |
Struktury | |
|---|---|
| tensorflow:: ops:: FakeQuantWithMinMaxArgs:: Attrs | Opcjonalne settery atrybutów dla FakeQuantWithMinMaxArgs . |
Atrybuty publiczne
działanie
Operation operation
wyjścia
::tensorflow::Output outputs
Funkcje publiczne
FakeQuantWithMinMaxArgs
FakeQuantWithMinMaxArgs( const ::tensorflow::Scope & scope, ::tensorflow::Input inputs )
FakeQuantWithMinMaxArgs
FakeQuantWithMinMaxArgs( const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, const FakeQuantWithMinMaxArgs::Attrs & attrs )
węzeł
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Publiczne funkcje statyczne
Maksym
Attrs Max( float x )
Min
Attrs Min( float x )
Wąski zakres
Attrs NarrowRange( bool x )
NumBits
Attrs NumBits( int64 x )