Error in C2, W3 Exercise-5

I am getting the following error while implementing the forward propagation exercise

what i am doing :- Z1 = tf.add(tf.linalg.matmul(W1, X),b1)
Error:-
“cannot compute MatMul as input #1(zero-based) was expected to be a double tensor but is a float tensor [Op:MatMul]”

I understand that first argument of matmul (which is W1) is not a double tensor :- So i tried doing this :- W1 = tf.cast(W1, tf.float32)

Still the same error continues.

Can anyone help me understand it?

I think you are misinterpreting the error. They specifically say:

So that means it’s the second argument, right? It’s the X value it is complaining about. But you shouldn’t need to adjust the types of anything. I just used TF operations as you show and it worked for me with no issues.

Hi Paul,
Thanks for the reply. I am able to solve it, the problem was that i was not initializing the parameters properly, however it passed the tests.