Hello Everyone!
I have recently started learning TensorFlow and so am currently a beginner. Currently, I am trying to perform a classification task using a simple neural network. However, I keep on getting a shape mismatch error when trying to fit the model.
My Input input is a 1D array of shape (45325,)
and my Output labels are also of the same shape. And I want to classify the data points into one of the 4 classes, hence the last layer is a Dense(4)
.
I tried searching the problem and found that I basically need to reshape my input tensor to (batch_size, tensor shape). Even after reshaping my tensor to (1, 45325), I am still getting an error ValueError: Shapes (None, 45325) and (1, 4) are incompatible. I have even tried using the tf.keras.Input()
as the starting layer but nothing seems to be working
Can someone kindly guide me on how to reshape my tensors so they are in the right shape
Thanks!