Coinbase-inspired fraud-model training service is validating an Adam optimizer implementation before running longer experiments. You need to perform the first Adam update (all moments start at zero) from the supplied parameters, gradient, learning rate and hyperparameters.
Perform the first Adam update, starting from zero moments (m0=v0=0, step t=1): m=(1−β1)g, v=(1−β2)g2, bias-correct them, and return θ−ηm^/(v^+ε).
Implement solve(theta,g,lr,b1,b2,eps).
Returns. Return the updated parameters as a NumPy array.
Example 1
Input:
solve([1.0, 2.0], [0.5, -1.0], 0.1, 0.9, 0.999, 1e-8)
Output:
[0.9, 2.1]
Example 2
Input:
solve([1.0], [0.0], 0.1, 0.9, 0.999, 1e-8)
Output:
[1.0]
No results yet
Run your code to check it against the examples, or submit to run every test.