tensoreflusso:: ops:: FakeQuantWithMinMaxVarsPerChannel

#include <array_ops.h>

Quantizzare in modo falso il tensore degli "input" di tipo float tramite float per canale.

Riepilogo

Quantizzare in modo falso il tensore inputs di tipo float per canale e una delle forme: [d] , [b, d] [b, h, w, d] tramite float per canale min e max di forma [d] a tensore outputs della stessa forma degli inputs .

Attributi

  • [min; max] definiscono l'intervallo di limitazione per i dati inputs .
  • i valori inputs vengono quantizzati nell'intervallo di quantizzazione ( [0; 2^num_bits - 1] quando narrow_range è falso e [1; 2^num_bits - 1] quando è vero) quindi dequantizzati e emessi come float in [min; max] intervallo.
  • num_bits è la larghezza di bit della quantizzazione; dai 2 ai 16 anni compresi.

Prima della quantizzazione, i valori min e max vengono regolati con la seguente logica. Si consiglia di avere min <= 0 <= max . Se 0 non è compreso nell'intervallo di valori, il comportamento può essere imprevisto:

  • Se 0 < min < max : min_adj = 0 e max_adj = max - min .
  • Se min < max < 0 : min_adj = min - max e max_adj = 0 .
  • Se min <= 0 <= max : scale = (max - min) / (2^num_bits - 1) , min_adj = scale * round(min / scale) e max_adj = max + min_adj - min .

Questa operazione ha un gradiente e quindi consente di allenare i valori min e max .

Argomenti:

Ritorna:

  • Output : il tensore delle uscite.

Costruttori e distruttori

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)

Attributi pubblici

operation
outputs

Funzioni pubbliche

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

Funzioni pubbliche statiche

NarrowRange (bool x)
NumBits (int64 x)

Strutture

tensorflow:: ops:: FakeQuantWithMinMaxVarsPerChannel:: Attrs

Setter di attributi facoltativi per FakeQuantWithMinMaxVarsPerChannel .

Attributi pubblici

operazione

Operation operation

uscite

::tensorflow::Output outputs

Funzioni pubbliche

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
)

nodo

::tensorflow::Node * node() const 

operatore::tensorflow::Input

 operator::tensorflow::Input() const 

operatore::tensorflow::Output

 operator::tensorflow::Output() const 

Funzioni pubbliche statiche

Gamma ristretta

Attrs NarrowRange(
  bool x
)

NumBits

Attrs NumBits(
  int64 x
)