UNQ_C4
GRADED FUNCTION: predict
I have completed the code for the predict function and when i run it there are no errors.
However, when i go onto to run the uneditable predict code In [2]: i get the following error -
NameError
Traceback (most recent call last)
in
5 tmp_X = np. random. randn (4, 2) - 0.5
6
→ 7 tmp_p = predict (tmp_X, tmp_w, tmp_b)
8 print (f’Output of predict: shape {tmp_p.shape}, value {tmp_p}')
g
in predict (X, w, b)
26
27
==-> 28
29
30
Calculate the prediction from the model
f_wb = sigmoid(z_wb)
Calculate the prediction for that training example
NameError: name ‘sigmoid’ is not defined
Herewith the lab reference number: fqubypinwvtm