Add dynamic range tests to relevant op_tests (letter C).

PiperOrigin-RevId: 316755889
Change-Id: If087d4bb5db715f2ccefa1aec15a89e9a915c5ad
This commit is contained in:
Suharsh Sivakumar 2020-06-16 14:16:01 -07:00 committed by TensorFlower Gardener
parent 295ee8ab72
commit 389405a779
4 changed files with 42 additions and 4 deletions

View File

@ -32,13 +32,22 @@ def make_concat_tests(options):
"num_tensors": [1, 2, 3, 4, 5, 6],
"axis": [0, 1, 2, 3, -3, -2, -1],
"type": [tf.float32, tf.uint8, tf.int32, tf.int64],
"fully_quantize": [False]
"fully_quantize": [False],
"dynamic_range_quantize": [False],
}, {
"base_shape": [[1, 3, 4, 3], [3, 4], [2, 3, 4, 3]],
"num_tensors": [1, 2, 3, 4, 5, 6],
"axis": [1, 2, 3, -3, -2, -1],
"type": [tf.float32],
"fully_quantize": [True]
"fully_quantize": [True],
"dynamic_range_quantize": [False],
}, {
"base_shape": [[1, 3, 4, 3]],
"num_tensors": [6],
"axis": [1],
"type": [tf.float32],
"fully_quantize": [False],
"dynamic_range_quantize": [True],
}]
def get_shape(parameters, delta):

View File

@ -39,6 +39,7 @@ def make_conv_tests(options):
"constant_filter": [True, False],
"channel_multiplier": [1, 2],
"fully_quantize": [False],
"dynamic_range_quantize": [False],
},
# TODO(b/134702301): The fully_quantize param is just ignored by the MLIR
# testing path now, resulting in duplicate tests. Either ignore these
@ -53,7 +54,20 @@ def make_conv_tests(options):
"constant_filter": [True],
"channel_multiplier": [1, 2],
"fully_quantize": [True],
}
"dynamic_range_quantize": [False],
},
{
"input_shape": [[1, 3, 4, 3]],
"filter_shape": [[1, 1]],
"strides": [[1, 1, 1, 1], [1, 2, 3, 1]],
"dilations": [[1, 1, 1, 1]],
"padding": ["SAME", "VALID"],
"data_format": ["NHWC"],
"constant_filter": [True],
"channel_multiplier": [2],
"fully_quantize": [False],
"dynamic_range_quantize": [True],
},
]
def get_tensor_shapes(parameters):

View File

@ -40,6 +40,7 @@ def make_conv_activation_tests(activation_op):
"constant_filter": [True, False],
"channel_multiplier": [1, 2],
"fully_quantize": [False],
"dynamic_range_quantize": [False],
},
# TODO(b/134702301): The fully_quantize param is just ignored by the
# MLIR testing path now, resulting in duplicate tests. Either ignore
@ -54,7 +55,20 @@ def make_conv_activation_tests(activation_op):
"constant_filter": [True],
"channel_multiplier": [1, 2],
"fully_quantize": [True],
}
"dynamic_range_quantize": [False],
},
{
"input_shape": [[1, 3, 4, 3]],
"filter_shape": [[1, 1], [2, 3], [3, 3]],
"strides": [[1, 1, 1, 1], [1, 2, 3, 1]],
"dilations": [[1, 1, 1, 1]],
"padding": ["SAME", "VALID"],
"data_format": ["NHWC"],
"constant_filter": [True],
"channel_multiplier": [1, 2],
"fully_quantize": [False],
"dynamic_range_quantize": [True],
},
]
def get_tensor_shapes(parameters):

View File

@ -36,6 +36,7 @@ def make_conv_with_shared_weights_tests(options):
"padding": ["SAME"],
"data_format": ["NHWC"],
"channel_multiplier": [1],
"dynamic_range_quantize": [False, True],
}]
def get_tensor_shapes(parameters):