提交 157e4195 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

R operator for sum

上级 e789837d
......@@ -1240,6 +1240,11 @@ class Sum(CAReduce):
i += 1
return Elemwise(scalar.second)(x, DimShuffle(gz.type.broadcastable, new_dims)(gz)),
def R_op(self, inputs, eval_points):
if None in eval_points:
return [None]
return self.make_node(*eval_points).outputs
def __str__(self):
if self.axis is None:
return "Sum"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论