提交 a50e760a authored 作者: Gokul's avatar Gokul

docstring fix

上级 c98a1668
......@@ -2084,16 +2084,17 @@ def grad_scale(x, multiplier):
:param multiplier: scale of the gradient
:examples:
x = theano.tensor.fscalar()
fx = theano.tensor.sin(x)
fp = theano.tensor.grad(fx, wrt=x)
fprime = theano.function([x], fp)
print(fprime(2))#-0.416
x = theano.tensor.fscalar()
fx = theano.tensor.sin(x)
f_inverse=grad_scale(fx,-1.)
fpp = theano.tensor.grad(f_inverse, wrt=x)
fpprime = theano.function([x], fpp)
print(fpprime(2))#0.416
fp = theano.tensor.grad(fx, wrt=x)
fprime = theano.function([x], fp)
print(fprime(2))#-0.416
f_inverse=grad_scale(fx,-1.)
fpp = theano.tensor.grad(f_inverse, wrt=x)
fpprime = theano.function([x], fpp)
print(fpprime(2))#0.416
"""
return GradScale(multiplier)(x)
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论