Skip to content

Commit

Permalink
Fix a tensorflow test bug. (apache#3165)
Browse files Browse the repository at this point in the history
Length of input_shape isn't always 4.
  • Loading branch information
lixiaoquan authored and wweic committed May 13, 2019
1 parent 4608e10 commit 21f6564
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/python/frontend/tensorflow/test_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def _test_pooling_iteration(input_shape, **kwargs):
def _test_pooling(input_shape, **kwargs):
_test_pooling_iteration(input_shape, **kwargs)

if is_gpu_available():
if is_gpu_available() and (len(input_shape) == 4):
input_shape = [input_shape[ii] for ii in (0, 3, 1, 2)]
kwargs['data_format'] = 'NCHW'
_test_pooling_iteration(input_shape, **kwargs)
Expand Down

0 comments on commit 21f6564

Please sign in to comment.