title: Error when checking target: expected dense_2 to have shape (2049,) but got array with shape (1,)
body: <pre><code>def train_generator(mixed_dev_data,drums_dev_data,slicing_frame):
    for i in range(40):
      mixed_data=np.pad(mixed_dev_data['arr_'+str(i)],[(0,0),(slicing_frame//2,slicing_frame//2)],mode='constant')[...,np.newaxis]
      drums_data=drums_dev_data['arr_'+str(i)]
      for j in range(drums_data.shape[1]):
        sliced_mixed_data=(mixed_data[:,j:j+slicing_frame])[np.newaxis,:]
        sliced_drums_data=drums_data[:,j+slicing_frame//2]
        print(sliced_drums_data.shape) # for chekcing shape, this gives (2049,) which is proper value
        yield (sliced_mixed_data,sliced_drums_data)
  </code></pre>
  <p>and below is my model, which takes(2049, frame, 1) as input and output is (2049,)</p>
  <pre><code>model=models.Sequential()
  model.add(layers.Conv2D(32, (15,3), activation='relu',input_shape=(2049,slicing_frame,1)))
  model.add(layers.Conv2D(16, (15,3), activation='relu'))
  model.add(layers.MaxPooling2D(pool_size=(5,1)))
  model.add(layers.Dropout(0.35))
  model.add(layers.Conv2D(64, (15,3),activation='relu'))
  model.add(layers.Conv2D(32, (15,3),activation='relu'))
  model.add(layers.MaxPooling2D(pool_size=(5,1)))
  model.add(layers.Dropout(0.35))
  model.add(layers.Conv2D(64, (15,3),activation='relu'))
  model.add(layers.Conv2D(32, (15,3),activation='relu'))
  model.add(layers.Flatten())
  model.add(layers.Dense(2049*3,activation='relu'))
  model.add(layers.Dense(2049,activation='sigmoid'))
  
  model.compile(optimizer='rmsprop',loss='mse',metrics=['mae'])
  history=model.fit_generator(generator=train_generator(Mixed_Dev,Drums_Dev,19),steps_per_epoch=100)
  </code></pre>
  <p>and the error message is <code>ValueError: Error when checking target: expected dense_2 to have shape (2049,) but got array with shape (1,)</code>
  which means the error in the final dense layer. what is the problem? and i'm also confusing about the loss function to use.</p>