提交 8d050fec authored 作者: Nicolas Bouchard's avatar Nicolas Bouchard

Made corrections.

上级 0e8e5069
...@@ -1563,7 +1563,7 @@ class SpSum(gof.op.Op): ...@@ -1563,7 +1563,7 @@ class SpSum(gof.op.Op):
matrix. matrix.
""" """
def __init__(self, axis=None, sparse_grad=False): def __init__(self, axis=None, sparse_grad=True):
super(SpSum, self).__init__() super(SpSum, self).__init__()
self.axis = axis self.axis = axis
self.structured = sparse_grad self.structured = sparse_grad
...@@ -1683,7 +1683,7 @@ class Diag(gof.op.Op): ...@@ -1683,7 +1683,7 @@ class Diag(gof.op.Op):
return [square_diagonal(gz)] return [square_diagonal(gz)]
def infer_shape(self, nodes, shapes): def infer_shape(self, nodes, shapes):
return [(tensor.minimum(*shapes[0]), )] return [(shapes[0][0], )]
def __str__(self): def __str__(self):
return self.__class__.__name__ return self.__class__.__name__
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论