You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
z = np.array([1., 2., 3., 4.])
a = my_softmax(z)
atf = tf.nn.softmax(z)
print(f"my_softmax(z): {a}")
print(f"tensorflow softmax(z): {atf}")
# BEGIN UNIT TEST
test_my_softmax(my_softmax)
# END UNIT TEST
with this error
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-4-9cac3ae3f00f> in <module>
1 z = np.array([1., 2., 3., 4.])
----> 2 a = my_softmax(z)
3 atf = tf.nn.softmax(z)
4 print(f"my_softmax(z): {a}")
5 print(f"tensorflow softmax(z): {atf}")
<ipython-input-3-666c0ba803d5> in my_softmax(z)
12
13 ### END CODE HERE ###
---> 14 return a
NameError: name 'a' is not defined
The text was updated successfully, but these errors were encountered:
In the function my_softmax, you should calculate the value a and return it, so that you can use the function properly.
And if you have calculated the" softmax of z", just return it .
If there are still problems, I‘d like to see the content of your entire function
You should know that it's an assignment, so it's different from those labs, which can be run to finish without writing something.
Look at cell 3,there are
###START CODE HERE###
###END CODE HERE###
that means you should write something to fill the missing code
with this error
The text was updated successfully, but these errors were encountered: