Cannot train keras model

I am trying to make a neural network model with Keras for predicting values (solubilities), basically, it’s a regression model. There are 2 inputs (temperature and salinity) and one output and also configured the input and output layer nodes according to it, 2 and 1 nodes respectively. I am using the GPU conda environment (Knime installed all the required libraries by itself after clicking create an environment in the python deep learning preferences). I have attached the screenshots of my configurations and knime workflow.

The problem is that during the learning process of the network learner the accuracy plot shows a horizontal plot with all values zeros and error plot also seems vague.I have attached a txt file for training data…just rename it to csv as I was not able to attach the csv file as the forum post editor didn’t allowed data.txt (835 Bytes)
Strontium sulphate knime ai(2).knwf (21.0 KB)

Hi @pradhyumna85,
I looked at a few of your settings, it looks like your loss function is set to Binary Cross Entropy in the Network Learner. This is only works with classification problems.

Try swapping the loss function to Mean Squared Error, this is more typical when predicting a numeric value like this.

Note that the accuracy tab on your learning monitor will still be flat, accuracy is a metric for classification problems, but your loss function tab should make a lot more sense.


Thanks Corey for your reply. I now see what was I doing wrong. And one more thing, the loss function is not decreasing but only revolving around a certain value…the output layer activation function is set to tanh. I have attached the screenshot. And also I think keras is not able to use my nvidia gpu as the training process seems slow for a gtx1650 gpu, for this i have attached the console log. And in the network learner configuration, cuda visible devices box is empty.

knime_console_log.txt (11.5 KB)

I will be very helpful if you can guide me to get results.