Getting NaN values in Sigmoid neuron function

getting nan values after running the code given below.

sn.fit(X,Y,1,0.5,True)

for i in range(10):
  print(sn.w,sn.b)
  sn.fit(X,Y,1,0.5,False)

@nikita_nagraj
The code you provided is not sufficient to debug. Most likely it is because of the values(or no values) stored inside X, Y.
Best way to ease debugging, is to share your code fully(may be a link to google colab if that is what you have used for coding)

https://colab.research.google.com/drive/1mSb5GAtCEL4Aw-rOQ8rUZ3IvW2Jn_IiR?usp=sharing

  def sigmoid(self,x):
    return (1.0/(1.0)+np.exp(-(x)))

Fix the brackets around denominator in sigmoid function.
it should be something like:
return 1.0/(1.0 + np.exp(-x))

It will resolve your error.

still getting nan values

I checked the code for last error, modified the sigmoid and it worked. i guess a different error now.

I think you can check some of the other threads about what all information can be provided in advance while reporting an error.

I ran your updated notebook, I don’t see Nan when you call fit.