提交 c3b88481 authored 作者: Ian Goodfellow's avatar Ian Goodfellow

updated doc for CAReduce with info from Olivier Breuleux

上级 edccf958
...@@ -1076,15 +1076,16 @@ class Elemwise(Op): ...@@ -1076,15 +1076,16 @@ class Elemwise(Op):
class CAReduce(Op): class CAReduce(Op):
""" """
CAReduce = Commutative Associative Reduce
Reduces a scalar operation along the specified axis(es). Reduces a scalar operation along the specified axis(es).
Named for the CAR function from LISP. (The scalar op should be both commutative and assocative)
The output will have the same shape as the input minus the reduced The output will have the same shape as the input minus the reduced
dimensions. It will contain the variable of accumulating all values dimensions. It will contain the variable of accumulating all values
over the reduced dimensions using the specified scalar op. over the reduced dimensions using the specified scalar op.
Examples: Examples:
CAReduce(add) -> sum CAReduce(add) -> sum (ie, acts like the numpy sum operation)
CAReduce(mul) -> product CAReduce(mul) -> product
CAReduce(maximum) -> max CAReduce(maximum) -> max
CAReduce(minimum) -> min CAReduce(minimum) -> min
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论