tensorflow:: ops:: FakeQuantWithMinMaxVarsPerChannel

#include <array_ops.h>

Cuantizar simuladamente el tensor 'inputs' de tipo float y una de las formas: [d] ,.

Resumen

[b, d] [b, h, w, d] a través de flotantes por canal min y max de forma [d] para 'salir' tensor de la misma forma que inputs .

[min; max] define el rango de limitación para los datos inputs . Los valores inputs se cuantifican dentro del rango de cuantificación ( [0; 2^num_bits - 1] cuando narrow_range es falso y [1; 2^num_bits - 1] cuando es verdadero) y luego se descuantizan y se generan como números de coma flotante en el intervalo [min; max] . num_bits es el ancho de bits de la cuantificación; entre 2 y 16, ambos inclusive.

Antes de la cuantización, los valores min y max se ajustan con la siguiente lógica. Se sugiere que min <= 0 <= max . Si 0 no está en el rango de valores, el comportamiento puede ser inesperado: Si 0 < min < max : min_adj = 0 y max_adj = max - min . Si min < max < 0 : min_adj = min - max y max_adj = 0 Si min <= 0 <= max : scale = (max - min) / (2^num_bits - 1) , min_adj = scale * round(min / scale) y max_adj = max + min_adj - min .

Esta operación tiene un gradiente y, por lo tanto, permite entrenar valores min y max .

Argumentos:

Devoluciones:

  • Output : El tensor de salida.

Constructores y destructores

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)

Atributos públicos

operation
outputs

Funciones públicas

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

funciones estáticas públicas

NarrowRange (bool x)
NumBits (int64 x)

Estructuras

tensorflow:: ops:: FakeQuantWithMinMaxVarsPerChannel:: Attrs

Configuradores de atributos opcionales para FakeQuantWithMinMaxVarsPerChannel .

Atributos públicos

operación

Operation operation

resultados

::tensorflow::Output outputs

Funciones públicas

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 

operador::tensorflow::Input

 operator::tensorflow::Input() const 

operador::tensorflow::Salida

 operator::tensorflow::Output() const 

funciones estáticas públicas

Rango estrecho

Attrs NarrowRange(
  bool x
)

NumBits

Attrs NumBits(
  int64 x
)