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

s/math.log/numpy.log in scalar.basic gives correct behaviour for negative values

上级 d00f619d
......@@ -1125,7 +1125,7 @@ inv = Inv(upgrade_to_float, name = 'inv')
class Log(UnaryScalarOp):
""" log base e """
def impl(self, x):
return math.log(x)
return numpy.log(x)
def grad(self, (x, ), (gz, )):
if x.type in grad_types:
return gz / x,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论