提交 921b8eb2 authored 作者: skaae's avatar skaae

fix static implementation error

上级 68ae1a76
...@@ -402,9 +402,12 @@ class J1(UnaryScalarOp): ...@@ -402,9 +402,12 @@ class J1(UnaryScalarOp):
""" """
@staticmethod @staticmethod
def impl(x): def st_impl(x):
return scipy.special.j1(x) return scipy.special.j1(x)
def impl(self, x):
return self.st_impl(x)
def grad(self, inp, grads): def grad(self, inp, grads):
raise NotImplementedError() raise NotImplementedError()
...@@ -422,9 +425,12 @@ class J0(UnaryScalarOp): ...@@ -422,9 +425,12 @@ class J0(UnaryScalarOp):
""" """
@staticmethod @staticmethod
def impl(x): def st_impl(x):
return scipy.special.j0(x) return scipy.special.j0(x)
def impl(self, x):
return self.st_impl(x)
def grad(self, inp, grads): def grad(self, inp, grads):
x, = inp x, = inp
gz, = grads gz, = grads
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论