Esempio n. 1
0
 def quantize_and_dequantize_v2_round_half_up(x):
   return array_ops.quantize_and_dequantize(
       x,
       -1,
       1.0,
       signed_input=True,
       num_bits=8,
       range_given=True,
       round_mode="HALF_UP")
Esempio n. 2
0
 def quantize_and_dequantize_v2_round_half_to_even(x):
   return array_ops.quantize_and_dequantize(
       x,
       -1.0,
       1.0,
       signed_input=True,
       num_bits=8,
       range_given=True,
       round_mode="HALF_TO_EVEN")
Esempio n. 3
0
 def quantize_and_dequantize_v2(x):
   return array_ops.quantize_and_dequantize(
       x, -127, 127, signed_input=True, num_bits=8)