Skip to content
DeepForgeby svx
All problems
MediumOptimizationop-346

Nesterov Lookahead Point

Problem

Nesterov momentum evaluates the gradient at the lookahead point y = x + beta * v.

Given x, the velocity v, and beta, return the lookahead point.

Hint

Extrapolate along the current velocity.

Test cases

case 1
in: [[1,1],[1,-1],0.9]
expected: [1.9,0.09999999999999998]
case 2
in: [[0,0],[1,1],0.5]
expected: [0.5,0.5]
case 3
in: [[2],[0.5],1]
expected: [2.5]
Starter codePython
def nesterov_lookahead_point(x, v, beta):
    # Your code here
    pass

3 test cases · run your code against them in the editor