Need guidance on Keras Sequential Model workflow (Basic)

Hi Team,

I am trying to create a sequential model using Keras to solve the problem of “Fashion MNist” - The idea was to replicate this python code using KNIME Keras nodes.
I am getting the error that

> expected dense_2 to have shape (1,) but got array with shape (10,)

My training data (.csv) has 60,000 rows with 784 data points for 28*28 pixels and one column with different labels ( from 0 to 9) which I have converted into ten columns using one hot encoding.

knime.log (3.1 KB)
Fashion_mnist.knwf (65.9 KB)

I am sure that I am missing something basic. I would appreciate the pointers to guide me in the right direction.

Hi @Jyotendra -

You are using sparse categorical cross entropy for your loss function - try binary cross entropy instead.


It worked :slight_smile:

Thank you Scott - I will read about these loss functions in detail on Keras documentation.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.