提交 451343c4 authored 作者: Frederic Bastien's avatar Frederic Bastien

white space fix

上级 7cc17ae7
...@@ -1505,7 +1505,7 @@ class SpecifyShape(Op): ...@@ -1505,7 +1505,7 @@ class SpecifyShape(Op):
L{Op} put into the graph the user provided shape L{Op} put into the graph the user provided shape
In the case where this op stay in the final graph, we assert the shape. In the case where this op stay in the final graph, we assert the shape.
For this the output of this op must be used in the graph. This is not For this the output of this op must be used in the graph. This is not
the case most of the time if we only take the shape of the output. the case most of the time if we only take the shape of the output.
Maybe there is other optimization that will mess with this. Maybe there is other optimization that will mess with this.
...@@ -1524,12 +1524,12 @@ class SpecifyShape(Op): ...@@ -1524,12 +1524,12 @@ class SpecifyShape(Op):
x = as_tensor_variable(x) x = as_tensor_variable(x)
shape = as_tensor_variable(shape) shape = as_tensor_variable(shape)
return Apply(self, [x, shape], [x.type()]) return Apply(self, [x, shape], [x.type()])
def perform(self, node, (x,shape ), (out, )): def perform(self, node, (x,shape ), (out, )):
assert numpy.all(x.shape==shape), ("got shape", x.shape, assert numpy.all(x.shape==shape), ("got shape", x.shape,
"expected", shape) "expected", shape)
out[0] = x out[0] = x
def infer_shape(self, node, (xshape, sshape)): def infer_shape(self, node, (xshape, sshape)):
new_shape=[] new_shape=[]
for dim in range(node.inputs[0].ndim): for dim in range(node.inputs[0].ndim):
...@@ -2276,7 +2276,7 @@ def std(input, axis=None): ...@@ -2276,7 +2276,7 @@ def std(input, axis=None):
:type axis: None or int or (list of int) (see `Sum`) :type axis: None or int or (list of int) (see `Sum`)
""" """
return sqrt(var(input=input, axis=axis)) return sqrt(var(input=input, axis=axis))
if 0: if 0:
## COMMENTED OUT FEB 17 2010 ## COMMENTED OUT FEB 17 2010
## TODO (DOCUMENT AND WRITE TESTS) OR DELETE ## TODO (DOCUMENT AND WRITE TESTS) OR DELETE
......
...@@ -3463,5 +3463,3 @@ if __name__ == '__main__': ...@@ -3463,5 +3463,3 @@ if __name__ == '__main__':
suite = unittest.TestLoader() suite = unittest.TestLoader()
suite = suite.loadTestsFromTestCase(testcase) suite = suite.loadTestsFromTestCase(testcase)
unittest.TextTestRunner(verbosity=2).run(suite) unittest.TextTestRunner(verbosity=2).run(suite)
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论