提交 19a81347 authored 作者: Frederic's avatar Frederic

Better doc of theano.sparse_grad

上级 c8ed209a
......@@ -172,8 +172,10 @@ def sparse_grad(var):
"""This function return a new variable whose gradient will be
stored in a sparse format instead of dense.
Currently only AdvancedSubtensor1 is supported.
Currently only variable created by AdvancedSubtensor1 is supported.
i.e. a_tensor_var[an_int_vector].
.. versionadded:: 0.6rc4
"""
assert isinstance(var.owner.op, tensor.AdvancedSubtensor1)
ret = var.owner.op.__class__(sparse_grad=True)(*var.owner.inputs)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论