tensorflow::ops::FakeQuantWithMinMaxVarsPerChannel
#include <array_ops.h>Quantification factice du tenseur « entrées » de type float via des floats par canal.
Résumé
Quantifiez de manière factice le tenseur inputs de type float par canal et l'une des formes : [d] , [b, d] [b, h, w, d] via min et max des floats par canal de forme [d] vers un tenseur outputs de même forme que inputs .
Attributs
-
[min; max]définissent la plage de limitation des donnéesinputs. - Les valeurs
inputssont quantifiées dans la plage de quantification ([0; 2^num_bits - 1]lorsquenarrow_rangeest faux et[1; 2^num_bits - 1]lorsqu'il est vrai) puis déquantifiées et sorties sous forme de nombres flottants dans l'intervalle[min; max]. -
num_bitsest la largeur en bits de la quantification ; entre 2 et 16 inclus.
Avant la quantification, les valeurs min et max sont ajustées selon la logique suivante. Il est conseillé d'avoir min <= 0 <= max . Si 0 n'est pas dans la plage de valeurs, le comportement peut être inattendu.
- Si
0 < min < max:min_adj = 0etmax_adj = max - min. - Si
min < max < 0:min_adj = min - maxetmax_adj = 0. - Si
min <= 0 <= max:scale = (max - min) / (2^num_bits - 1),min_adj = scale * round(min / scale)etmax_adj = max + min_adj - min.
Cette opération présente un gradient et permet ainsi de déterminer les valeurs min et max d'entraînement.
Arguments :
- portée : un objet Scope
Retours :
-
Output: Le tenseur de sorties.
Constructeurs et destructeurs | |
|---|---|
FakeQuantWithMinMaxVarsPerChannel (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input min, :: tensorflow::Input max) | |
FakeQuantWithMinMaxVarsPerChannel (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input min, :: tensorflow::Input max, const FakeQuantWithMinMaxVarsPerChannel::Attrs & attrs) |
attributs publics | |
|---|---|
operation | |
outputs | |
fonctions publiques | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
fonctions statiques publiques | |
|---|---|
NarrowRange (bool x) | |
NumBits (int64 x) | |
Structures | |
|---|---|
| tensorflow::ops::FakeQuantWithMinMaxVarsPerChannel::Attrs | Définiteurs d'attributs optionnels pour FakeQuantWithMinMaxVarsPerChannel . |
attributs publics
opération
Operation operation
sorties
::tensorflow::Output outputs
fonctions publiques
FakeQuantAvecMinMaxVarsPerChannel
FakeQuantWithMinMaxVarsPerChannel( const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, ::tensorflow::Input min, ::tensorflow::Input max )
FakeQuantAvecMinMaxVarsPerChannel
FakeQuantWithMinMaxVarsPerChannel( const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, ::tensorflow::Input min, ::tensorflow::Input max, const FakeQuantWithMinMaxVarsPerChannel::Attrs & attrs )
nœud
::tensorflow::Node * node() const
opérateur::tensorflow::Entrée
operator::tensorflow::Input() const
opérateur::tensorflow::Sortie
operator::tensorflow::Output() const
fonctions statiques publiques
NarrowRange
Attrs NarrowRange( bool x )
NumBits
Attrs NumBits( int64 x )