title: Activation function error in a 1D CNN in Keras
body: <p>I'm creating a model to classify if the input waverform contains rising edge of SDA of I2C line.</p>
  
  <p>My input has 20000 datapoints and 100 training data.</p>
  
  <p>I've initially found an answer regarding the input in here <a href="https://stackoverflow.com/questions/44088859/keras-1d-cnn-how-to-specify-dimension-correctly">Keras 1D CNN: How to specify dimension correctly?</a></p>
  
  <p>However, I'm getting an error in the activation function:</p>
  
  <pre><code>ValueError: Error when checking target: expected activation_1 to have 3 dimensions, but got array with shape (100, 1)
  </code></pre>
  
  <p>My model is:</p>
  
  <pre><code>model.add(Conv1D(filters=n_filter,
               kernel_size=input_filter_length,
               strides=1,
               activation='relu',
               input_shape=(20000,1)))
  model.add(BatchNormalization())
  model.add(MaxPooling1D(pool_size=4, strides=None))
  
  model.add(Dense(1))
  model.add(Activation("sigmoid"))
  
  adam = Adam(lr=learning_rate)
  
  model.compile(optimizer= adam, loss='binary_crossentropy', metrics=['accuracy'])
  
  model.fit(train_data, train_label,
        nb_epoch=10,
        batch_size=batch_size, shuffle=True)
  
  score = np.asarray(model.evaluate(test_new_data, test_label, batch_size=batch_size))*100.0
  </code></pre>
  
  <p>I can't determine the problem in here. On why the activation function expects a 3D tensor.</p>