tensorflow :: opérations :: FakeQuantWithMinMaxVarsPerChannel
#include <array_ops.h>
Fake-quantifier le tenseur «entrées» de type float et l'une des formes: [d]
Résumé
[b, d]
[b, h, w, d]
via les flotteurs par canal min
et max
de forme [d]
vers le tenseur de «sorties» de même forme que les inputs
.
[min; max]
définissent la plage de serrage des données d' inputs
. inputs
valeurs d' inputs
sont quantifiées dans la plage de quantification ( [0; 2^num_bits - 1]
lorsque narrow_range
est faux et [1; 2^num_bits - 1]
quand il est vrai) puis dé-quantifiées et sorties sous forme de flottants dans [min; max]
intervalle. num_bits
est la largeur de bits de la quantification; entre 2 et 16 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 = 0
et max_adj = max - min
. Si min < max < 0
: min_adj = min - max
et max_adj = 0
. Si min <= 0 <= max
: scale = (max - min) / (2^num_bits - 1)
, min_adj = scale * round(min / scale)
et max_adj = max + min_adj - min
.
Cette opération a un gradient et permet ainsi la formation des valeurs min
et max
.
Arguments:
- scope: un objet Scope
Retour:
-
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) |
Structs | |
---|---|
tensorflow :: ops :: FakeQuantWithMinMaxVarsPerChannel :: Attrs | Définisseurs d' attributs facultatifs pour FakeQuantWithMinMaxVarsPerChannel . |
Attributs publics
opération
Operation operation
les 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
operator :: tensorflow :: Input
operator::tensorflow::Input() const
operator :: tensorflow :: Output
operator::tensorflow::Output() const
Fonctions statiques publiques
Fourchette étroite
Attrs NarrowRange( bool x )
NumBits
Attrs NumBits( int64 x )