|
62 | 62 | fused_batch_norm = tf.compat.v1.nn.fused_batch_norm
|
63 | 63 | dropout = tf.compat.v1.nn.dropout
|
64 | 64 | resize_nearest_neighbor = tf.compat.v1.image.resize_nearest_neighbor
|
| 65 | + quantize_and_dequantize = tf.quantization.quantize_and_dequantize |
65 | 66 | resize_bilinear = tf.compat.v1.image.resize_bilinear
|
66 | 67 | is_nan = tf.math.is_nan
|
67 | 68 | is_inf = tf.math.is_inf
|
@@ -1918,18 +1919,16 @@ def graph_validator(g):
|
1918 | 1919 | self._run_test_case(func_fusedbn, [_OUTPUT], {_INPUT: x_val}, rtol=1e-05, graph_validator=graph_validator)
|
1919 | 1920 |
|
1920 | 1921 | @check_tf_min_version("1.15")
|
1921 |
| - @skip_tf2() |
1922 | 1922 | @check_opset_min_version(10, "quantize_and_dequantize")
|
1923 | 1923 | def test_qdq_unsigned_input(self):
|
1924 | 1924 | x_shape = [3, 3, 2]
|
1925 | 1925 | x_val = np.arange(1, 1+np.prod(x_shape)).astype("float32").reshape(x_shape)
|
1926 | 1926 | def func(x):
|
1927 |
| - x_ = quantize_and_dequantize(x, 1.0, 6.0, signed_input=False, narrow_range=False, range_given=True) |
| 1927 | + x_ = quantize_and_dequantize(x, 1.0, 6.0, signed_input=False, range_given=True) |
1928 | 1928 | return tf.identity(x_, name=_TFOUTPUT)
|
1929 | 1929 | _ = self._run_test_case(func, [_OUTPUT], {_INPUT: x_val})
|
1930 | 1930 |
|
1931 | 1931 | @check_tf_min_version("1.15")
|
1932 |
| - @skip_tf2() |
1933 | 1932 | @check_opset_min_version(10, "quantize_and_dequantize")
|
1934 | 1933 | def test_qdq_signed_input(self):
|
1935 | 1934 | x_shape = [3, 3, 2]
|
|
0 commit comments