In update_parameters_with_adam function, after carefully checking, I’m still not sure why I get uncorrected here. The expected value and my output difference is very small. Please help me. (image below)

*{moderator edit - solution code removed}*

In update_parameters_with_adam function, after carefully checking, I’m still not sure why I get uncorrected here. The expected value and my output difference is very small. Please help me. (image below)

*{moderator edit - solution code removed}*

Hi @QUY_LE_MINH ,

As you screenshot didn’t cover the entire line of code for the parameters update, I am guessing there is a closing parenthesis being misplaced at the function call np.sqrt(). Please check the formula, epsilon is outside of the square root.

Hi,

Sorry for that inconvenience. Here is my full loc:

*{moderator edit - solution code removed}*

I think that the epsilon is not the issue.

Hi @QUY_LE_MINH ,

That is exactually what I pointed out to you. Your code showed that the np.sqrt() call included epsilon. If you check the formula, epsilon is placed outside of the square root. In other word, epsilon should only be added after the square root of {s_corrected}_{dw^{[l]}}