diff options
author | 2018-01-29 10:46:05 -0700 | |
---|---|---|
committer | 2018-01-29 09:46:05 -0800 | |
commit | 9de5db8676a037a42da1e99de77abfcf75d10809 (patch) | |
tree | bd8d41cf47df6662d524fcb5fcf704392a88bc75 | |
parent | 8fb12848d3a81a010714a4612ffd735106ea83d8 (diff) |
Reverting the switch to max_pool_v2 in python (#16524)
-rw-r--r-- | tensorflow/contrib/specs/python/specs_test.py | 14 | ||||
-rw-r--r-- | tensorflow/python/ops/nn_ops.py | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/tensorflow/contrib/specs/python/specs_test.py b/tensorflow/contrib/specs/python/specs_test.py index d5f61d1b69..41782a9fc9 100644 --- a/tensorflow/contrib/specs/python/specs_test.py +++ b/tensorflow/contrib/specs/python/specs_test.py @@ -87,7 +87,7 @@ class SpecsTest(test.TestCase): self.assertEqual(tuple(result.shape), (1, 8, 8, 5)) self.assertEqual( summaries.tf_spec_structure(spec, inputs), - "_ _ _ maxpoolv2 _ _ maxpoolv2 _ _ maxpoolv2") + "_ maxpool maxpool maxpool") def testAbbrevPower(self): with self.test_session(): @@ -100,10 +100,10 @@ class SpecsTest(test.TestCase): self.assertEqual(tuple(result.shape), (1, 8, 8, 5)) self.assertEqual( summaries.tf_spec_structure(spec, inputs), - "_ variablev2 conv variablev2 biasadd relu _ _ maxpoolv2" + "_ variablev2 conv variablev2 biasadd relu maxpool" " variablev2 conv variablev2" - " biasadd relu _ _ maxpoolv2 variablev2 conv variablev2" - " biasadd relu _ _ maxpoolv2") + " biasadd relu maxpool variablev2 conv variablev2" + " biasadd relu maxpool") def testAbbrevPower2(self): with self.test_session(): @@ -117,10 +117,10 @@ class SpecsTest(test.TestCase): self.assertEqual(tuple(result.shape), (1, 8, 8, 5)) self.assertEqual( summaries.tf_spec_structure(spec, inputs), - "_ variablev2 conv variablev2 biasadd relu _ _ maxpoolv2" + "_ variablev2 conv variablev2 biasadd relu maxpool" " variablev2 conv variablev2 biasadd relu" - " _ _ maxpoolv2 variablev2 conv variablev2 biasadd relu" - " _ _ maxpoolv2") + " maxpool variablev2 conv variablev2 biasadd relu" + " maxpool") def testConc(self): with self.test_session(): diff --git a/tensorflow/python/ops/nn_ops.py b/tensorflow/python/ops/nn_ops.py index 644bb3af8a..9f0cc4a029 100644 --- a/tensorflow/python/ops/nn_ops.py +++ b/tensorflow/python/ops/nn_ops.py @@ -2070,7 +2070,7 @@ def max_pool(value, ksize, strides, padding, data_format="NHWC", name=None): """ with ops.name_scope(name, "MaxPool", [value]) as name: value = ops.convert_to_tensor(value, name="input") - return gen_nn_ops._max_pool_v2(value, + return gen_nn_ops._max_pool(value, ksize=ksize, strides=strides, padding=padding, |