As the comments show, I thought if just switching numpy functions to tf functions such as tf.math.add, tf.linalg.matmul, tf.keras.activations.relu, then everything might work well. But I got this error:
AssertionError: Output does not match
I double checked if I had typo or wrong variable, but I typed right.
When I print my current answer Z3, I got something different from correct value. Here is what I got:
That is exactly what you have to do. And the comments are correct. [the comments could be wrong in some notebooks, see @paulinpaloalto’s post below] Feel free to send me a private message with your code so that I can point you in the right direction.
The one thing to point out is that the comment that describes how to compute Z3 is wrong. The input there should be A2, not Z2. This has already been reported and fixed, but the new version is not deployed yet.
It must’ve been deployed. I checked the formulas in my own notebook and they were correct. I didn’t realize they were different from the ones @baekTree posted
Great! I saw the “pull” request with the fix, but figured if baekTree had seen it the other way that it still must be the previous version. Did you get an “autoupdate” of that notebook or did you do the manual “Lab Help → Get Latest Version” method?
Ok, I just answered my own question: I opened that notebook and it did not “autoupdate” and I still had the old incorrect version. Then I did the “rename” followed by “Lab Help → Get Latest Version” and I got the fixed version. So it is deployed, but you have to manually ask for the new version.
For anyone who has not been through the “Get Latest Version” procedure before, there’s a topic about it on the FAQ Thread. It’s easy, but the only thing that might trip anyone up is the point that you need to rename your existing notebook or it will not be replaced.