title: Keras model ValueError: Can not squeeze dim[1], expected a dimension of 1, got 90
body: <p>My current model is:</p>
  <pre><code># from tensorflow.keras.layers import InputLayer
  model_training = Sequential()
  # input_layer = keras.Input(shape=(300,1))
  model_training.add(InputLayer(input_shape=(300,1)))
  model_training.add(Conv1D(filters=32, kernel_size=3, padding='same', activation='tanh'))
  model_training.add(Dropout(0.2))
  model_training.add(MaxPooling1D(pool_size=3))
  model_training.add(Dropout(0.2))
  model_training.add(Conv1D(filters=32, kernel_size=3, padding='same', activation='tanh'))
  model_training.add(Dropout(0.2))
  model_training.add(MaxPooling1D(pool_size=3))
  # model_training.add(Dropout(0.2))
  # model_training.add(Conv1D(filters=32, kernel_size=3, padding='same', activation='tanh'))
  # model_training.add(Dropout(0.2))
  # model_training.add(MaxPooling1D(pool_size=3))
  # model_training.add(Dropout(0.2))
  # model_training.add(Conv1D(filters=32, kernel_size=3, padding='same', activation='tanh'))
  # model_training.add(Dropout(0.2))
  # model_training.add(MaxPooling1D(pool_size=3))
  # model_training.add(Dropout(0.2))
  #model.add(Dropout(0.2))
  model_training.add(Flatten())
  model_training.add(Dense(90))
  model_training.add(Activation('sigmoid'))
  model_training.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
  print(model_training.summary())
  </code></pre>
  <p>My fit function:</p>
  <pre><code>model_training.fit(train_data, train_labels, validation_data=(test_data, test_labels), batch_size=32, epochs=15)
  </code></pre>
  <p>I get this error when I run this:</p>
  <pre><code>ValueError: Can not squeeze dim[1], expected a dimension of 1, got 90 for '{{node Squeeze}} = Squeeze[T=DT_FLOAT, squeeze_dims=[-1]](remove_squeezable_dimensions/Squeeze)' with input shapes: [?,90].
  </code></pre>
  <p>Any idea?
  my output layer has 90 as there are 90 classes in total to give a prediction on.</p>
  <p>The train and labels are shaped as follows:</p>
  <pre><code>(7769, 300, 1)
  (7769, 90, 1)
  
  </code></pre>
  <p>I can't figure out this issue. Any help is appreciated!
  Partial model summary:</p>
  <p><a href="https://i.stack.imgur.com/8XBCm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8XBCm.png" alt="enter image description here" /></a></p>