提交 43e5a647 authored 作者: Nicolas Bouchard's avatar Nicolas Bouchard

Made some corrections.

上级 b03d5e01
......@@ -210,15 +210,14 @@ def bincount(x, weights=None, minlength=None):
def squeeze(x):
"""Remove broadcastable dimension from
"""Remove broadcastable dimensions from
the shape of an array.
It returns the input array, but with with all or a subset of the
dimensions with the broadcastable dimensions removed. This is
It returns the input array, but with the
broadcastable dimensions removed. This is
always `x` itself or a view into `x`.
:param x: Input data, tensor variable.
:param out_nd: Output number of dimension for this op.
:return: `x` without its broadcastable dimensions.
"""
......
......@@ -145,12 +145,11 @@ class TestDiffOp(utt.InferShapeTester):
class SqueezeTester(utt.InferShapeTester):
shape_list = [(1, 3),
(1, 2, 3),
(1, 5, 1 , 1, 6)]
(1, 5, 1, 1, 6)]
broadcast_list = [[True, False],
[True, False, False],
[True, False, True, True, False]]
def setUp(self):
super(SqueezeTester, self).setUp()
self.op = squeeze
......@@ -165,6 +164,7 @@ class SqueezeTester(utt.InferShapeTester):
expected = numpy.squeeze(data)
tested = f(data)
assert tested.shape == expected.shape
assert numpy.allclose(tested, expected)
def test_infer_shape(self):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论