Can someone explain or summarize the input shape of keras under different type of neural networks?
Generally, CNN takes 4 dimensions as input data. Whenever you train a CNN the model in Keras it will automatically convert the input data into 4D. If you want to predict using your CNN model you have to make sure that even your output data/ or the data you want to run the inference on should have the same dimensions as input data. You can simply add 0 or None at the output data by using numpy expand_dims function.
I am very new to the python keras. And with the understanding of the Keras, I'm confusing about the input shape of Keras. I feel under different neural network, I need to reconstruct my data into different shapes.
For example, if I'm building a simple ANN, my train data should be a matrix like [m, n], the m is the number of samples and n is the number of feature. But recently I'm learning 1D convolutional neural network. I found the tutorial construct the training data as [a, b, c], where the a is the number of sample, b is the number of timestep, c is the number of feature (equals to 1). But why I can't simply reshape the data into [a, b]? since c will always be 1 for a 1D convolutional neural network.
I'm not sure if I understand the above right. I am just wondering is there a summarize of the training_data shape of different neural networks? Or is there any logic behind the shape of data? So I can always make sure my training data has the right format.
The different neural networks mean like ANN, 1D CNN, 2d CNN, RNN and so on.