tensorflow:: ops:: QuantizeAndDequantizeV2:: Attrs

#include <array_ops.h>

Configuradores de atributos opcionales para QuantizeAndDequantizeV2 .

Resumen

Atributos públicos

narrow_range_ = false
bool
num_bits_ = 8
int64
range_given_ = false
bool
round_mode_ = "HALF_TO_EVEN"
StringPiece
signed_input_ = true
bool

Funciones públicas

NarrowRange (bool x)
TF_MUST_USE_RESULT Attrs
Si es verdadero, entonces el valor absoluto del valor mínimo cuantificado es el mismo que el valor máximo cuantificado, en lugar de ser 1 mayor.
NumBits (int64 x)
TF_MUST_USE_RESULT Attrs
El ancho de bits de la cuantización.
RangeGiven (bool x)
TF_MUST_USE_RESULT Attrs
Si el rango está dado o debe determinarse a partir del tensor input .
RoundMode (StringPiece x)
TF_MUST_USE_RESULT Attrs
El atributo 'round_mode' controla qué algoritmo de desempate de redondeo se utiliza al redondear valores flotantes a sus equivalentes cuantificados.
SignedInput (bool x)
TF_MUST_USE_RESULT Attrs
Si la cuantización es con signo o sin signo.

Atributos públicos

rango_estrecho_

bool tensorflow::ops::QuantizeAndDequantizeV2::Attrs::narrow_range_ = false

num_bits_

int64 tensorflow::ops::QuantizeAndDequantizeV2::Attrs::num_bits_ = 8

rango_dado_

bool tensorflow::ops::QuantizeAndDequantizeV2::Attrs::range_given_ = false

modo_redondo_

StringPiece tensorflow::ops::QuantizeAndDequantizeV2::Attrs::round_mode_ = "HALF_TO_EVEN"

entrada_firmada_

bool tensorflow::ops::QuantizeAndDequantizeV2::Attrs::signed_input_ = true

Funciones públicas

Rango estrecho

TF_MUST_USE_RESULT Attrs tensorflow::ops::QuantizeAndDequantizeV2::Attrs::NarrowRange(
  bool x
)

Si es verdadero, entonces el valor absoluto del valor mínimo cuantificado es el mismo que el valor máximo cuantificado, en lugar de ser 1 mayor.

Es decir, para la cuantización de 8 bits, el valor mínimo es -127 en lugar de -128.

Por defecto es falso.

NumBits

TF_MUST_USE_RESULT Attrs tensorflow::ops::QuantizeAndDequantizeV2::Attrs::NumBits(
  int64 x
)

El ancho de bits de la cuantización.

El valor predeterminado es 8.

Rango dado

TF_MUST_USE_RESULT Attrs tensorflow::ops::QuantizeAndDequantizeV2::Attrs::RangeGiven(
  bool x
)

Si el rango está dado o debe determinarse a partir del tensor input .

Por defecto es falso.

Modo redondo

TF_MUST_USE_RESULT Attrs tensorflow::ops::QuantizeAndDequantizeV2::Attrs::RoundMode(
  StringPiece x
)

El atributo 'round_mode' controla qué algoritmo de desempate de redondeo se utiliza al redondear valores flotantes a sus equivalentes cuantificados.

Actualmente se admiten los siguientes modos de redondeo:

  • HALF_TO_EVEN: este es el modo de redondeo predeterminado.
  • HALF_UP: redondea hacia el positivo. En este modo, 7,5 se redondea a 8 y -7,5 se redondea a -7.

Por defecto, se establece en "HALF_TO_EVEN"

Entrada firmada

TF_MUST_USE_RESULT Attrs tensorflow::ops::QuantizeAndDequantizeV2::Attrs::SignedInput(
  bool x
)

Si la cuantización es con signo o sin signo.

(en realidad, este parámetro debería haberse llamado signed_output )

Por defecto es verdadero.