Convolution_model_Step_by_Step_v1_Exercise 2 - conv_single_step

when I use Z = Z + float(b) it works but it says Error: Wrong output

But notice the final value is still correct, I don’t understand
what should I do?

You should use np.float(b) or np.float64(b).

The result must be a numpy array, in order to be added to Z.

1 Like

Hi @TMosh !
Despite having used the recommendations, neither of the two options continues to work for me:
Z= Z+np.float64(b)
Z= Z+np.float(b)

and the answer is the same for both:

assert (type(Z) == np.float64), “You must cast the output to numpy float 64”
assert np.isclose(Z, -6.999089450680221), “Wrong value”
Z = -6.999089450680221
All tests passed

What should I do?

Thanks in advance.

Perhaps your ‘Z’ variable is the wrong type.

It depends on the rest of your code.
No, please do not post your code here.

sorry for writing the code here. I got the solution. I made a mistake of adding bias in the element wise coding.

now that I cleared this part of the test, the assert Z still shows wrong value. I am going right???

The image you posted says “All tests passed!”.

yes I just want to be sure I am going right. I cleared the test. thank you TMosh :slight_smile: