提交 bd3047b6 authored 作者: Frederic's avatar Frederic

Better error message

上级 49a9a318
......@@ -60,7 +60,8 @@ class SortOp(theano.Op):
a, axis = inputs
inp_grad = theano.gradient.grad_not_implemented(
self, 0, axis,
"Currently, we only implement the gradient on sort for vector")
"Currently, we only implement the gradient on sort for vector"
" and matrix (and axis is None)")
if a.ndim == 1:
idx = argsort(*inputs, kind=self.kind, order=self.order)
# rev_idx = numpy.where(idx[None, :]==numpy.arange(5)[:,None])[1]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论