title: ValueError: Shapes (None, 200, 3) and (1, 3) are incompatible
body: <p>This is the model that I am trying to train for identifying possible tag(out of three tags) for each word, also I have added a layer from another model whose output shape is [1, 100]tensors and then I have concatenate it with BiLSTM output-</p>
  <pre><code>input1_entity = Input(shape = (200,))
  
  last_hidden_layer_output = last_hidden_layer(tensorflow.reshape(input1_entity, [1, 200]))
  
  embedding_entity = Embedding((4817), 200, input_length = 200, weights = [embedding_matrix], trainable = False)(input1_entity)
  bilstm1_entity = Bidirectional(LSTM(100, return_sequences = True, recurrent_dropout = 0.2), merge_mode = 'concat')(embedding_entity)
  lstm1_entity = Bidirectional(LSTM(100, return_sequences = True, dropout = 0.5, recurrent_dropout = 0.2))(bilstm1_entity)
  lstm2_entity = Bidirectional(LSTM(50))(lstm1_entity)
  
  merge_layer = concatenate([lstm2_entity, last_hidden_layer_output])
  
  dense1_entity = Dense(128, activation = 'relu')(merge_layer)
  
  dense2_entity = Dense(128, activation = 'relu')(dense1_entity)
  dropout1_entity = Dropout(0.5)(dense2_entity)
  
  dense3_entity = Dense(64, activation = 'tanh')(dropout1_entity)
      
  output1_entity = Dense(3, activation = 'softmax')(dense3_entity)
      
  model_entity = Model(inputs = input1_entity, outputs = output1_entity)
      
  model_entity.compile(
      loss = 'categorical_crossentropy',
      optimizer = 'adam',
      metrics = [tensorflow.keras.metrics.CategoricalAccuracy()],
      sample_weight_mode = 'temporal'
  )
  </code></pre>
  <p>And this is how I am training the model -</p>
  <pre><code>history = model_entity.fit(pad_tokens_train, 
                      np.array(pad_tags_train),
                      batch_size=250, 
                      verbose=1, 
                      epochs=50,
                      sample_weight = sample_weight,
                      validation_split=0.2)
  </code></pre>
  <p>But I keep on getting this error -</p>
  <pre><code>ValueError: in user code:
  
      File &quot;/Users/kawaii/miniforge3/envs/tensor_no_gpu/lib/python3.8/site-packages/keras/engine/training.py&quot;, line 878, in train_function  *
          return step_function(self, iterator)
      File &quot;/Users/kawaii/miniforge3/envs/tensor_no_gpu/lib/python3.8/site-packages/keras/engine/training.py&quot;, line 867, in step_function  **
          outputs = model.distribute_strategy.run(run_step, args=(data,))
      File &quot;/Users/kawaii/miniforge3/envs/tensor_no_gpu/lib/python3.8/site-packages/keras/engine/training.py&quot;, line 860, in run_step  **
          outputs = model.train_step(data)
      File &quot;/Users/kawaii/miniforge3/envs/tensor_no_gpu/lib/python3.8/site-packages/keras/engine/training.py&quot;, line 809, in train_step
          loss = self.compiled_loss(
      File &quot;/Users/kawaii/miniforge3/envs/tensor_no_gpu/lib/python3.8/site-packages/keras/engine/compile_utils.py&quot;, line 201, in __call__
          loss_value = loss_obj(y_t, y_p, sample_weight=sw)
      File &quot;/Users/kawaii/miniforge3/envs/tensor_no_gpu/lib/python3.8/site-packages/keras/losses.py&quot;, line 141, in __call__
          losses = call_fn(y_true, y_pred)
      File &quot;/Users/kawaii/miniforge3/envs/tensor_no_gpu/lib/python3.8/site-packages/keras/losses.py&quot;, line 245, in call  **
          return ag_fn(y_true, y_pred, **self._fn_kwargs)
      File &quot;/Users/kawaii/miniforge3/envs/tensor_no_gpu/lib/python3.8/site-packages/keras/losses.py&quot;, line 1664, in categorical_crossentropy
          return backend.categorical_crossentropy(
      File &quot;/Users/kawaii/miniforge3/envs/tensor_no_gpu/lib/python3.8/site-packages/keras/backend.py&quot;, line 4994, in categorical_crossentropy
          target.shape.assert_is_compatible_with(output.shape)
  
      ValueError: Shapes (None, 200, 3) and (1, 3) are incompatible
  </code></pre>