Skip to content

Commit 6847040

Browse files
committed
Fix conv_ops_3d and pooling_ops_test scripts
1 parent 5144685 commit 6847040

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tensorflow/python/kernel_tests/conv_ops_3d_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def _DtypesToTest(self, use_gpu):
6161
# as we will be using its gradients as reference for fp16 gradients.
6262
return optional_float64 + [dtypes.float32, dtypes.float16]
6363
else:
64-
return [dtypes.float32, dtypes.float16] + ([dtypes.float64]
64+
return [dtypes.float32, dtypes.float16] + ([dtypes.float64] \
6565
if not test.is_built_with_rocm else [])
6666

6767
def _SetupValuesForDevice(self, tensor_in_sizes, filter_in_sizes, stride,

tensorflow/python/kernel_tests/pooling_ops_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ def testDepthwiseMaxPoolInvalidConfigs(self):
766766
# The following are tests that verify that the CPU and GPU implementations
767767
# produce the same results.
768768
def _CompareMaxPoolingFwd(self, input_shape, ksize, strides, padding):
769-
for dtype in [np.float32, np.float16] + [np.float64]
769+
for dtype in [np.float32, np.float16] + [np.float64] \
770770
if not test.is_built_with_rocm() else []:
771771
tensor_input = np.random.rand(*input_shape).astype(dtype)
772772
with self.cached_session(use_gpu=True):
@@ -781,7 +781,7 @@ def _CompareMaxPoolingFwd(self, input_shape, ksize, strides, padding):
781781

782782
def _CompareMaxPoolingBk(self, input_shape, output_shape, ksize, strides,
783783
padding):
784-
for dtype in [np.float32, np.float16] + [np.float64]
784+
for dtype in [np.float32, np.float16] + [np.float64] \
785785
if not test.is_built_with_rocm() else []:
786786
# Generate numbers in a narrow range, so that there are many duplicates
787787
# in the input.
@@ -812,7 +812,7 @@ def _CompareMaxPoolingBk(self, input_shape, output_shape, ksize, strides,
812812

813813
def _CompareMaxPoolingGradBk(self, input_shape, output_shape, ksize, strides,
814814
padding):
815-
for dtype in [np.float32, np.float16] + [np.float64]
815+
for dtype in [np.float32, np.float16] + [np.float64] \
816816
if not test.is_built_with_rocm() else []:
817817
# Generate numbers in a narrow range, so that there are many duplicates
818818
# in the input.

0 commit comments

Comments
 (0)