提交 e722f71f authored 作者: Gijs van Tulder's avatar Gijs van Tulder

Convert docstrings for pooling tests to normal comments.

The unittest framework printed the docstrings instead of the function name, but this was not very helpful in identifying the tests.
上级 bd7bfba9
...@@ -360,7 +360,7 @@ class TestDownsampleFactorMax(utt.InferShapeTester): ...@@ -360,7 +360,7 @@ class TestDownsampleFactorMax(utt.InferShapeTester):
utt.verify_grad(mp, [imval], rng=rng) utt.verify_grad(mp, [imval], rng=rng)
def test_DownsampleFactorMax_grad_st(self): def test_DownsampleFactorMax_grad_st(self):
"""checks the gradient for the case that stride is used""" # checks the gradient for the case that stride is used
rng = numpy.random.RandomState(utt.fetch_seed()) rng = numpy.random.RandomState(utt.fetch_seed())
maxpoolshps = ((1, 1), (3, 3), (5, 3)) maxpoolshps = ((1, 1), (3, 3), (5, 3))
stridesizes = ((1, 1), (3, 3), (5, 7)) stridesizes = ((1, 1), (3, 3), (5, 7))
...@@ -379,8 +379,8 @@ class TestDownsampleFactorMax(utt.InferShapeTester): ...@@ -379,8 +379,8 @@ class TestDownsampleFactorMax(utt.InferShapeTester):
utt.verify_grad(mp, [imval], rng=rng) utt.verify_grad(mp, [imval], rng=rng)
def test_DownsampleFactorMax_grad_st_extra(self): def test_DownsampleFactorMax_grad_st_extra(self):
"""checks the gradient for the case # checks the gradient for the case
that stride is used for extra examples""" # that stride is used for extra examples
rng = numpy.random.RandomState(utt.fetch_seed()) rng = numpy.random.RandomState(utt.fetch_seed())
maxpoolshps = ((5, 3), (5, 3), (5, 3), (5, 5), (3, 2), (7, 7), (9, 9)) maxpoolshps = ((5, 3), (5, 3), (5, 3), (5, 5), (3, 2), (7, 7), (9, 9))
stridesizes = ((3, 2), (7, 5), (10, 6), (1, 1), stridesizes = ((3, 2), (7, 5), (10, 6), (1, 1),
...@@ -446,8 +446,8 @@ class TestDownsampleFactorMax(utt.InferShapeTester): ...@@ -446,8 +446,8 @@ class TestDownsampleFactorMax(utt.InferShapeTester):
utt.verify_grad(mp, [imval, grad_val], rng=rng) utt.verify_grad(mp, [imval, grad_val], rng=rng)
def test_DownsampleFactorMaxGrad_grad_st(self): def test_DownsampleFactorMaxGrad_grad_st(self):
"""checks the gradient of the gradient for # checks the gradient of the gradient for
the case that stride is used""" # the case that stride is used
rng = numpy.random.RandomState(utt.fetch_seed()) rng = numpy.random.RandomState(utt.fetch_seed())
maxpoolshps = ((1, 1), (3, 3), (5, 3)) maxpoolshps = ((1, 1), (3, 3), (5, 3))
stridesizes = ((1, 1), (3, 3), (5, 7)) stridesizes = ((1, 1), (3, 3), (5, 7))
...@@ -470,8 +470,8 @@ class TestDownsampleFactorMax(utt.InferShapeTester): ...@@ -470,8 +470,8 @@ class TestDownsampleFactorMax(utt.InferShapeTester):
utt.verify_grad(mp, [imval, grad_val], rng=rng) utt.verify_grad(mp, [imval, grad_val], rng=rng)
def test_AveragePoolGrad_grad_st(self): def test_AveragePoolGrad_grad_st(self):
"""checks the gradient of the gradient for # checks the gradient of the gradient for
the case that stride is used""" # the case that stride is used
rng = numpy.random.RandomState(utt.fetch_seed()) rng = numpy.random.RandomState(utt.fetch_seed())
avgpoolshps = ((1, 1), (3, 3), (5, 3)) avgpoolshps = ((1, 1), (3, 3), (5, 3))
stridesizes = ((1, 1), (3, 3), (5, 7)) stridesizes = ((1, 1), (3, 3), (5, 7))
...@@ -494,8 +494,8 @@ class TestDownsampleFactorMax(utt.InferShapeTester): ...@@ -494,8 +494,8 @@ class TestDownsampleFactorMax(utt.InferShapeTester):
utt.verify_grad(mp, [imval, grad_val], rng=rng) utt.verify_grad(mp, [imval, grad_val], rng=rng)
def test_DownsampleFactorMaxGrad_grad_st_extra(self): def test_DownsampleFactorMaxGrad_grad_st_extra(self):
"""checks the gradient of the gradient for the case that # checks the gradient of the gradient for the case that
stride is used for extra examples""" # stride is used for extra examples
rng = numpy.random.RandomState(utt.fetch_seed()) rng = numpy.random.RandomState(utt.fetch_seed())
maxpoolshps = ((5, 3), (5, 3), (5, 3), (5, 5), (3, 2), (7, 7), (9, 9)) maxpoolshps = ((5, 3), (5, 3), (5, 3), (5, 5), (3, 2), (7, 7), (9, 9))
stridesizes = ((3, 2), (7, 5), (10, 6), (1, 1), stridesizes = ((3, 2), (7, 5), (10, 6), (1, 1),
...@@ -526,8 +526,8 @@ class TestDownsampleFactorMax(utt.InferShapeTester): ...@@ -526,8 +526,8 @@ class TestDownsampleFactorMax(utt.InferShapeTester):
utt.verify_grad(mp, [imval, grad_val], rng=rng) utt.verify_grad(mp, [imval, grad_val], rng=rng)
def test_AveragePoolGrad_grad_st_extra(self): def test_AveragePoolGrad_grad_st_extra(self):
"""checks the gradient of the gradient for the case that # checks the gradient of the gradient for the case that
stride is used for extra examples""" # stride is used for extra examples
rng = numpy.random.RandomState(utt.fetch_seed()) rng = numpy.random.RandomState(utt.fetch_seed())
avgpoolshps = ((5, 3), (5, 3), (5, 3), (5, 5), (3, 2), (7, 7), (9, 9)) avgpoolshps = ((5, 3), (5, 3), (5, 3), (5, 5), (3, 2), (7, 7), (9, 9))
stridesizes = ((3, 2), (7, 5), (10, 6), (1, 1), stridesizes = ((3, 2), (7, 5), (10, 6), (1, 1),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论