0
$\begingroup$

i am working on computer vision using deep learning. my training data contains (x,128) shape. i am passing the same to conv1d layer but facing issues

below is my model

input_dim = (128,)     
classifier = Sequential()

#convolutional layer 1
classifier.add(Convolution1D(32, kernel_size=3,input_shape = input_dim, activation = 'relu'))
classifier.add(MaxPooling1D(pool_size=2)) 
classifier.add(Dropout(.20))

#convolutional layer 2
classifier.add(Convolution1D(32, kernel_size=3, activation = 'relu'))
classifier.add(MaxPooling1D(pool_size=2))
classifier.add(Dropout(.20))

classifier.add(Convolution1D(32, kernel_size=3, activation = 'relu'))
classifier.add(MaxPooling1D(pool_size=2))
classifier.add(Dropout(.20))

#flatten 
classifier.add(Flatten())
classifier.add(Dense(output_dim =  128, activation='relu'))
$\endgroup$
  • $\begingroup$ Check your dims! $\endgroup$ – Aditya Jul 15 '19 at 8:13
  • $\begingroup$ Look at this answer, this is probably the same issue here: stackoverflow.com/a/49841111/9858126 $\endgroup$ – Sean Mirchi Jul 15 '19 at 8:21
  • $\begingroup$ @SeanMirchi i tried it. but still facing the same issue $\endgroup$ – Ashu Jul 15 '19 at 9:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.