Another predictions always equals to 1.0


#1

Hi,

I use this tutorial on Kaggle (https://www.kaggle.com/htoukour/neural-networks-to-predict-diabetes) with the Pima diabete example.

In this blog, they first build a very simple neural network like this :

model_1 = Sequential([
Dense(12, input_shape=(8,), activation=“relu”),
Dense(1, activation=“sigmoid”)
])

So, I build this one with DLS :
image

And I use the same parameters than in this blog :

image

But I have this plots :

And this inference:

image

The outcome data is a numeric one and on OutputPort0

image

and the activation function for the final layer is Sigmoid

image

How can you explain that I don’t get (about) the same result than the blog one which is :

image

Another question :

If I get the DLS Native code, it works :

image

but if I want to get the Keras (or Pytorch or …), I get ::
Timeout occured during conversion

Why?

Best regards,

Philippe


#2

Hi Phillippe I tried the same model given in the kaggle and here are the result


The reason you are not getting result is because of the learning rate. They have used a small value since the model is very small as well as the data is not well distributed.
You have taken lr =0.03 instead of 0.003 so due to increase in learning rate your model is not able to learn weights properly.

Regards
Rajat