input_shape=(128, 128, 3) for 128x128 RGB pictures (samples, rows, cols, channels) if data_format='channels_last'--
You received this message because you are subscribed to the Google Groups "Keras-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keras-users+unsubscribe@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/keras-users/a012c385-2cc6-4342-aa11-5339ea841a80%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I have a training set on the form X_train.shape = (1000, 420, 420) representing 1000 grayscale images (actually spectrograms) with size 420x420.
Why is that? A spectrogram is 2D, one dimension is time and the other is frequency. You mean I should just consider one dimension?
input_shape = (420, 420, 1) is the correct one, but it seems you did not reshape your input data as well, your input data should have shape (1000, 420, 420, 1). Then it should work.
On 27 April 2017 at 10:09, Colin Nordin Persson <colin....@gmail.com> wrote:
I have a training set on the form X_train.shape = (1000, 420, 420) representing 1000 grayscale images (actually spectrograms) with size 420x420.I think the Keras documentation is a bit confusing because there are two descriptions of what the argument input_shape should be for a Conv2D-layer:
input_shape=(128, 128, 3)for 128x128 RGB pictures(samples, rows, cols, channels)if data_format='channels_last'(my configuration is set to channels_last)According to the first description I think I should use input_shape = (420,420,1), this does however give the error:expected conv2d_1_input to have 4 dimensions, but got array with shape (1000, 420, 420)When instead trying input_shape = (1000,420,420,1), I get the error:Input 0 is incompatible with layer conv2d_1: expected ndim=4, found ndim=5So I'm clearly doing something weird, anyone has an idea?Thanks!
--
You received this message because you are subscribed to the Google Groups "Keras-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keras-users...@googlegroups.com.
input_shape = (420, 420, 1) is the correct one, but it seems you did not reshape your input data as well, your input data should have shape (1000, 420, 420, 1). Then it should work.
On 27 April 2017 at 10:09, Colin Nordin Persson <colin....@gmail.com> wrote:
I have a training set on the form X_train.shape = (1000, 420, 420) representing 1000 grayscale images (actually spectrograms) with size 420x420.I think the Keras documentation is a bit confusing because there are two descriptions of what the argument input_shape should be for a Conv2D-layer:
input_shape=(128, 128, 3)for 128x128 RGB pictures(samples, rows, cols, channels)if data_format='channels_last'(my configuration is set to channels_last)According to the first description I think I should use input_shape = (420,420,1), this does however give the error:expected conv2d_1_input to have 4 dimensions, but got array with shape (1000, 420, 420)When instead trying input_shape = (1000,420,420,1), I get the error:Input 0 is incompatible with layer conv2d_1: expected ndim=4, found ndim=5So I'm clearly doing something weird, anyone has an idea?Thanks!
--
You received this message because you are subscribed to the Google Groups "Keras-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keras-users...@googlegroups.com.