提交 4764c84c authored 作者: Frederic Bastien's avatar Frederic Bastien

added comment.

上级 291c2019
...@@ -1318,6 +1318,7 @@ class Neg(UnaryScalarOp): ...@@ -1318,6 +1318,7 @@ class Neg(UnaryScalarOp):
neg = Neg(same_out, name = 'neg') neg = Neg(same_out, name = 'neg')
class Inv(UnaryScalarOp): class Inv(UnaryScalarOp):
""" multiplicative inverse. Also called reciprocal"""
def impl(self, x): def impl(self, x):
return 1.0 / x return 1.0 / x
def grad(self, (x, ), (gz, )): def grad(self, (x, ), (gz, )):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论