提交 54379729 authored 作者: James Bergstra's avatar James Bergstra

added docstring to local_softmax_with_bias

上级 d2406c02
...@@ -395,6 +395,8 @@ softmax = Softmax() ...@@ -395,6 +395,8 @@ softmax = Softmax()
@opt.register_specialize @opt.register_specialize
@gof.local_optimizer([softmax]) @gof.local_optimizer([softmax])
def local_softmax_with_bias(node): def local_softmax_with_bias(node):
"""Try to turn softmax(sum_of_stuff) -> softmax_w_bias(matrix, bias)
"""
if node.op == softmax: if node.op == softmax:
x, = node.inputs x, = node.inputs
if x.owner and x.owner.op == tensor.add: if x.owner and x.owner.op == tensor.add:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论