mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Correct gradient of rosenbrock (#3881)
This commit is contained in:
parent
74fd79d889
commit
fca77c9e25
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user