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?