提交 599756f1 authored 作者: John Salvatier's avatar John Salvatier

improve error message for grad of ProdWithoutZeros

上级 2846a3aa
......@@ -2139,3 +2139,8 @@ class ProdWithoutZeros(CAReduceDtype):
def __init__(self, axis=None, dtype=None, acc_dtype=None):
CAReduceDtype.__init__(self, mul_without_zeros, axis=axis,
dtype=dtype, acc_dtype=acc_dtype)
def grad(self, inp, grads):
raise NotImplementedError(
'2nd derivatives of `product(a)` is not currently supported.'
'If `a` is guarenteed to contains no zeros, use `product(a, no_zeros_in_input=True)`.'
)
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论