**I was not clear with the logistic neuron , After the Input[51] line , we haven’t trained our model but how did we get the parameter’s w an b in In[54] line not clear with that **

got clear , the model was trained by default , i have trained the model again with X_train[0] i got different w and b , later at last i got the predicted output same as logistic output

Hello @MOHIT_KOTA

A slight correction in how you understood it - The model did not get "trained’ by default. Instead the weights were randomly “initialized” when you invoked tf.keras.layers.Dense()

then why it not worked for neutron in linear model type

see the image

The weight initialization will happen for the activation = ‘linear’ case as well.

It will happen whan you instantiate the class as below:

Case 1:

linear_layer = tf.keras.layers.Dense(units=1, activation = ‘linear’, )

linear_layer.get_weights()

**[] —> The weights do not get initialized**

Case 2:

linear_layer = tf.keras.layers.Dense(units=1, activation = ‘linear’, )

linear_layer(X_train) —> Instantiate *linear_layer* by passing the input X_train

linear_layer.get_weights()

**[array([[0.68]], dtype=float32), array([0.], dtype=float32)]** ** → The weights get initialized**