DLS COURSE 1,week 2 ,exercise 4

I’m getting assertion in the in initialization of w &b. How to rectify this?

Hi, Vishnu,

The value of b, should be a float, but you are putting it as an integer and so, the output is wrong.

2 Likes

thank you for the help

Hi Rashmi, I imputed b as a float but I’m getting this error “TypeError: data type not understood”. Can you help out please? Thanks!

You don’t show the actual exception trace, but I’ll bet that error is not the assertion about the type of b: it is that you have used the wrong syntax for np.zeros. Check the documentation (which I found by googling “numpy zeros”): it takes a “tuple” of integers giving the dimensions as the single argument. You probably gave several arguments for the different dimensions.

1 Like

That’s exactly what happened @paulinpaloalto . I passed the dimensions plainly to the np.zeros() function and forgot to enclose them in brackets.
I just fixed. Thanks for your help.