From fca77c9e256b9f67ae7d593ba242cab033bcd89f Mon Sep 17 00:00:00 2001 From: theFool Date: Mon, 27 Nov 2017 00:49:04 +0800 Subject: [PATCH] Correct gradient of rosenbrock (#3881) --- test/optim/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/optim/test.py b/test/optim/test.py index 2c81aeae981..459bc0f29e2 100644 --- a/test/optim/test.py +++ b/test/optim/test.py @@ -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,