przepływ tensorowy:: ops:: FakeQuantWithMinMaxArgs
#include <array_ops.h>Fałszywie skwantuj tensor „wejściowy”, wpisz float do tensora „wyjściowego” tego samego typu.
Streszczenie
Atrybuty [min; max] definiuje zakres zaciskania danych inputs . wartości inputs są kwantowane do zakresu kwantyzacji ( [0; 2^num_bits - 1] gdy narrow_range ma wartość false i [1; 2^num_bits - 1] gdy jest prawdą), a następnie dekwantyzowane i wyprowadzane jako wartości zmiennoprzecinkowe w [min; max] interwał. 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ę, aby min <= 0 <= max . Jeśli 0 nie należy do zakresu 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 .
Kwantyzacja nazywana jest fałszywą, ponieważ wynik jest nadal zmiennoprzecinkowy.
Argumenty:
- zakres: Obiekt Scope
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 moduły ustawiające atrybuty 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::Wejście
operator::tensorflow::Input() const
operator::tensorflow::Wyjście
operator::tensorflow::Output() const
Publiczne funkcje statyczne
Maks
Attrs Max( float x )
Min
Attrs Min( float x )
WąskiZakres
Attrs NarrowRange( bool x )
Liczba bitów
Attrs NumBits( int64 x )