flux tensoriel : : opérations : : FakeQuantWithMinMaxVarsPerChannel
#include <array_ops.h>Fausse quantifier le tenseur des « entrées » de type float via des flotteurs par canal.
Résumé
Fausse quantifier le tenseur inputs de type float par canal et l'une des formes : [d] , [b, d] [b, h, w, d] via les floats par canal min et max de forme [d] à outputs un tenseur de même forme que inputs .
Attributs
-
[min; max]définit la plage de serrage pour les donnéesinputs. - les valeurs
inputssont quantifiées dans la plage de quantification ([0; 2^num_bits - 1]lorsquenarrow_rangeest fausse et[1; 2^num_bits - 1]lorsqu'elle est vraie), puis déquantifiées et sorties sous forme de flotteurs dans[min; max]intervalle. -
num_bitsest la largeur de bits de la quantification ; entre 2 et 16 ans inclus.
Avant la quantification, les valeurs min et max sont ajustées avec la logique suivante. Il est suggéré 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 a un gradient et permet ainsi d'entraîner les valeurs min et max .
Arguments :
- scope : un objet Scope
Retours :
-
Output: Le tenseur des 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 | Setters d'attributs facultatifs pour FakeQuantWithMinMaxVarsPerChannel . |
Attributs publics
opération
Operation operation
sorties
::tensorflow::Output outputs
Fonctions publiques
FakeQuantWithMinMaxVarsPerChannel
FakeQuantWithMinMaxVarsPerChannel( const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, ::tensorflow::Input min, ::tensorflow::Input max )
FakeQuantWithMinMaxVarsPerChannel
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
Plage étroite
Attrs NarrowRange( bool x )
Nombre de bits
Attrs NumBits( int64 x )