提交 052ddd0e authored 作者: Harm de Vries's avatar Harm de Vries

changed grad

上级 bd85f115
......@@ -173,11 +173,7 @@ class ArgSortOp(theano.Op):
def grad(self, inputs, output_grads):
# No grad defined for intergers.
inp, axis = inputs
inp_grad = theano.gradient.grad_not_implemented(
self, 0, axis,
"I'm not sure if argsort should have its gradient"
" implemented or is should be marked as undefined."
" So I mark it as not implemented for now.")
inp_grad = inp.zeros_like()
axis_grad = theano.gradient.grad_undefined(
self, 1, axis,
"argsort is not defined for non-integer axes so"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论