NameError: name 'softmax' is not defined

In the last lab for the Sequence Models I expected to have the softmax() function imported to use it, but I get the following error:
“NameError: name ‘softmax’ is not defined”
Does the function need to be build from scratch again?
I did not find any numpy alternative to use.
Any help is very welcome!


Exercise 3 - scaled_dot_product_attention

Sorry for the confusion, the right Excercise was:

Exercise 3 - scaled_dot_product_attention

Use tf.nn.softmax(…).

1 Like