Correct gradient of rosenbrock (#3881)

This commit is contained in:
theFool 2017-11-27 00:49:04 +08:00 committed by Soumith Chintala
parent 74fd79d889
commit fca77c9e25

View File

@ -11,7 +11,7 @@ def rosenbrock(tensor):
def drosenbrock(tensor):
x, y = tensor
return torch.DoubleTensor((-400 * x * (y - x ** 2) - 2 * (1 - x), 200 * x * (y - x ** 2)))
return torch.DoubleTensor((-400 * x * (y - x ** 2) - 2 * (1 - x), 200 * (y - x ** 2)))
algorithms = {
'adadelta': optim.adadelta,