提交 ff7c816c authored 作者: Iban Harlouchet's avatar Iban Harlouchet

numpydoc for theano/tensor/opt_uncanonicalize.py

上级 f6141a60
......@@ -28,8 +28,8 @@ problem.
Also, we should make the fgraph refuse optimization that break the
canonization of the graph in the optimizations phases where the graph is
supposed to be canonical.
"""
"""
# TODO: intelligent merge for mul/add
# TODO: 0*x -> 0
import logging
......@@ -72,12 +72,15 @@ def local_max_and_argmax(node):
@gof.local_optimizer([T.neg])
def local_max_to_min(node):
"""
change -(max(-x)) to min
Change -(max(-x)) to min.
This is tested in tensor/tests/test_basic.py:test_min_max.
This is tested in tensor/tests/test_basic.py:test_min_max
Notes
-----
We don't need an opt that will do the reverse as by default
the interface put only MaxAndArgmax into the graph.
:note: we don't need an opt that will do the reverse as by default
the interface put only MaxAndArgmax into the graph.
"""
if node.op == T.neg and node.inputs[0].owner:
max = node.inputs[0]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论