Skip to content

Commit 435cdfc

Browse files
author
Amit Patankar
authored
Merge pull request tensorflow#11145 from av8ramit/cherrypicks
Fix for contrib.layers test that was raising an IndexError (tensorflow#11069)
2 parents 5d8c0a6 + a697833 commit 435cdfc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tensorflow/contrib/layers/python/layers/layers_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,12 +1422,12 @@ def testDensePartialFlatten(self):
14221422

14231423
def testSparsePartialFlatten(self):
14241424
"""Test `_inner_flatten` on `SparseTensor`s."""
1425-
shape = [4, 3, 11, 6, 1, 3]
1425+
shape = [4, 3, 11, 6]
14261426
np.random.seed(10301)
14271427
random_ = np.random.rand(*shape)
14281428
indices, values, _ = _sparsify(random_)
14291429

1430-
for new_rank in [1, 2, 3, 4, 5]:
1430+
for new_rank in [1, 2, 3]:
14311431
expected_shape = (shape[:new_rank - 1] + [np.prod(shape[new_rank - 1:])])
14321432
reshaped_random_ = np.reshape(random_, expected_shape)
14331433
expected_indices, expected_values, _ = _sparsify(reshaped_random_)

0 commit comments

Comments
 (0)