Perform one stochastic-gradient-descent update: w←w−ηg.
Implement solve(w,grad,lr).
Returns. Return the updated parameters as a NumPy array (the input is not modified).
Example 1
Input:
solve([1.0, 2.0], [0.1, 0.2], 0.01)
Output:
[0.999, 1.998]
Example 2
Input:
solve([5.0], [-2.0], 0.5)
Output:
[6.0]
No results yet
Run your code to check it against the examples, or submit to run every test.