diff options
author | 2017-11-22 00:39:22 -0800 | |
---|---|---|
committer | 2017-11-22 00:42:30 -0800 | |
commit | e70c00950d295c519fd9c7f8b12e13a3c5aaf710 (patch) | |
tree | ee1210f8810e0b0fec9346f762e854b371899919 /tensorflow/python/kernel_tests/depthwise_conv_op_test.py | |
parent | ad7eeec1cc06d7fdba6ee404f03a35fab9cd3e6a (diff) |
Automated g4 rollback of changelist 176615107
PiperOrigin-RevId: 176622438
Diffstat (limited to 'tensorflow/python/kernel_tests/depthwise_conv_op_test.py')
-rw-r--r-- | tensorflow/python/kernel_tests/depthwise_conv_op_test.py | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/tensorflow/python/kernel_tests/depthwise_conv_op_test.py b/tensorflow/python/kernel_tests/depthwise_conv_op_test.py index f7ae1a0f37..3298092fbe 100644 --- a/tensorflow/python/kernel_tests/depthwise_conv_op_test.py +++ b/tensorflow/python/kernel_tests/depthwise_conv_op_test.py @@ -122,9 +122,7 @@ class DepthwiseConv2DTest(test.TestCase): x1 = [f * 1.0 for f in range(1, total_size_1 + 1)] x2 = [f * 1.0 for f in range(1, total_size_2 + 1)] with self.test_session(use_gpu=use_gpu) as sess: - if data_type == dtypes.float16: - tolerance = 1e-5 - elif data_type == dtypes.float32: + if data_type == dtypes.float32: tolerance = 1e-5 else: self.assertEqual(data_type, dtypes.float64) @@ -171,7 +169,7 @@ class DepthwiseConv2DTest(test.TestCase): padding) in enumerate(ConfigsToTest()): print("Testing DepthwiseConv2D,", index, "th config:", input_size, "*", filter_size, "stride:", stride, "padding:", padding) - for data_type in [dtypes.float16, dtypes.float32, dtypes.float64]: + for data_type in [dtypes.float32, dtypes.float64]: self._VerifyValues( input_size, filter_size, stride, padding, data_type, use_gpu=True) @@ -183,7 +181,7 @@ class DepthwiseConv2DTest(test.TestCase): padding) in enumerate(ConfigsToTest()): print("Testing DepthwiseConv2DFormat,", index, "th config:", input_size, "*", filter_size, "stride:", stride, "padding:", padding) - for data_type in [dtypes.float16, dtypes.float32, dtypes.float64]: + for data_type in [dtypes.float32, dtypes.float64]: self._VerifyValues( input_size, filter_size, @@ -320,9 +318,7 @@ class DepthwiseConv2DTest(test.TestCase): input_data = [x * 1.0 / input_size for x in range(0, input_size)] filter_data = [x * 1.0 / filter_size for x in range(0, filter_size)] with self.test_session(use_gpu=use_gpu): - if data_type == dtypes.float16: - tolerance = 0.002 - elif data_type == dtypes.float32: + if data_type == dtypes.float32: tolerance = 0.002 else: self.assertEqual(data_type, dtypes.float64) @@ -373,8 +369,6 @@ class DepthwiseConv2DTest(test.TestCase): print("Testing DepthwiseConv2DInputGrad,", index, "th config:", input_size, "*", filter_size, "stride:", stride, "padding:", padding) - # Note: float16 test for DepthwiseConv2DInputGrad is not enabled, - # calculations are not very precise. for data_type in [dtypes.float32, dtypes.float64]: self._ConstructAndTestGradient( input_size, @@ -395,8 +389,6 @@ class DepthwiseConv2DTest(test.TestCase): print("Testing DepthwiseConv2DInputGradFormat,", index, "th config:", input_size, "*", filter_size, "stride:", stride, "padding:", padding) - # Note: float16 test for DepthwiseConv2DInputGradFormat is not enabled, - # calculations are not very precise. for data_type in [dtypes.float32, dtypes.float64]: self._ConstructAndTestGradient( input_size, @@ -415,8 +407,6 @@ class DepthwiseConv2DTest(test.TestCase): print("Testing DepthwiseConv2DFilterGrad,", index, "th config:", input_size, "*", filter_size, "stride:", stride, "padding:", padding) - # Note: float16 test for DepthwiseConv2DFilterGrad is not enabled, - # calculations are not very precise. for data_type in [dtypes.float32, dtypes.float64]: self._ConstructAndTestGradient( input_size, @@ -437,8 +427,6 @@ class DepthwiseConv2DTest(test.TestCase): print("Testing DepthwiseConv2DFilterGradFormat,", index, "th config:", input_size, "*", filter_size, "stride:", stride, "padding:", padding) - # Note: float16 test for DepthwiseConv2DFilterGradFormat is not enabled, - # calculations are not very precise. for data_type in [dtypes.float32, dtypes.float64]: self._ConstructAndTestGradient( input_size, |