title: Training accuracy of CNN model giving accuracy as zero always ? How can improve Training accuracy
body: <p>the code worked but i've received accuracy value as zero in each epoch,  tried many ideas and suggestions from google and stackoverflow ,but nothing helped</p>
  <pre><code>from numpy import array
  from numpy import reshape
  import numpy as np
  def model_CNN(X_train,Y_train,X_test,Y_test):
  model = Sequential()
      model.add(Conv1D(filters=512, kernel_size=32, padding='same', kernel_initializer='normal', activation='relu', input_shape=(256, 1)))
      model.add(Conv1D(filters=512, kernel_size=32, padding='same', kernel_initializer='normal', activation='relu'))
      model.add(Dropout(0.2)) # This is the dropout layer. It's main function is to inactivate 20% of neurons in order to prevent overfitting
      model.add(Conv1D(filters=256, kernel_size=32, padding='same', kernel_initializer='normal', activation='relu'))
      model.add(Dropout(0.2))
      model.add(Conv1D(filters=256, kernel_size=32, padding='same', kernel_initializer='normal', activation='relu'))
      model.add(Flatten())
      optimizer = keras.optimizers.SGD(lr=0.001, momentum=0.5 )
      model.compile(loss='mean_squared_error', optimizer=optimizer,metrics=['accuracy'])
      convolutional_model = model.fit(X_train, Y_train, epochs=5,batch_size=256,verbose = 1, validation_data=(X_test, Y_test))
  </code></pre>
  <p>this is the shape of my values :</p>
  <pre><code>(426, 29, 1) (426, 1)
  (143, 29, 1) (143, 1)
  </code></pre>
  <p>and i've received my output like this:</p>
  <pre><code>Epoch 1/5
  WARNING:tensorflow:Model was constructed with shape (None, 256, 1) for input Tensor(&quot;conv1d_48_input:0&quot;, shape=(None, 256, 1), dtype=float32), but it was called on an input with incompatible shape (None, 29, 1).
  WARNING:tensorflow:Model was constructed with shape (None, 256, 1) for input Tensor(&quot;conv1d_48_input:0&quot;, shape=(None, 256, 1), dtype=float32), but it was called on an input with incompatible shape (None, 29, 1).
  2/2 [==============================] - ETA: 0s - loss: 66.5119 - accuracy: 0.0000e+00WARNING:tensorflow:Callbacks method `on_train_batch_end` is slow compared to the batch time (batch time: 0.0449s vs `on_train_batch_end` time: 0.0872s). Check your callbacks.
  WARNING:tensorflow:Model was constructed with shape (None, 256, 1) for input Tensor(&quot;conv1d_48_input:0&quot;, shape=(None, 256, 1), dtype=float32), but it was called on an input with incompatible shape (None, 29, 1).
  2/2 [==============================] - 0s 216ms/step - loss: 66.5119 - accuracy: 0.0000e+00 - val_loss: 11.4075 - val_accuracy: 0.0000e+00
  Epoch 2/5
  2/2 [==============================] - 0s 142ms/step - loss: 20.7915 - accuracy: 0.0000e+00 - val_loss: 5.1864 - val_accuracy: 0.0000e+00
  Epoch 3/5
  2/2 [==============================] - 0s 140ms/step - loss: 11.4995 - accuracy: 0.0000e+00 - val_loss: 3.5993 - val_accuracy: 0.0000e+00
  Epoch 4/5
  2/2 [==============================] - 0s 145ms/step - loss: 8.5100 - accuracy: 0.0000e+00 - val_loss: 2.9013 - val_accuracy: 0.0000e+00
  Epoch 5/5
  2/2 [==============================] - 0s 139ms/step - loss: 7.1619 - accuracy: 0.0000e+00 - val_loss: 2.4821 - val_accuracy: 0.0000e+00
  </code></pre>
  <p>any possible methods to improve the accuracy for above problem ,please help me</p>