提交 c22879a3 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Fix comparison following code review.

上级 b558e074
...@@ -6305,7 +6305,7 @@ class SortOp(theano.Op): ...@@ -6305,7 +6305,7 @@ class SortOp(theano.Op):
# So there should be the same number of dimensions # So there should be the same number of dimensions
# in the input and output # in the input and output
assert node.inputs[0].ndim == node.outputs[0].ndim assert node.inputs[0].ndim == node.outputs[0].ndim
assert inputs_shapes[1] is () assert inputs_shapes[1] == ()
return [inputs_shapes[0]] return [inputs_shapes[0]]
#**** It need the argsort, so we can't do it now. #**** It need the argsort, so we can't do it now.
...@@ -6390,7 +6390,7 @@ class ArgSortOp(theano.Op): ...@@ -6390,7 +6390,7 @@ class ArgSortOp(theano.Op):
# axis should not be None, so there should be the same number of # axis should not be None, so there should be the same number of
# dimensions in the input and output # dimensions in the input and output
assert node.inputs[0].ndim == node.outputs[0].ndim assert node.inputs[0].ndim == node.outputs[0].ndim
assert inputs_shapes[1] is () assert inputs_shapes[1] == ()
return [inputs_shapes[0]] return [inputs_shapes[0]]
def grad(self, inputs, output_grads): def grad(self, inputs, output_grads):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论