title: Can someone help me find a solution to error source in my code?
body: <p>I am training a BI-LSTM-CRF model for a NER task. I was able to build the model, but when I fit it with the training data, googlecolab throw me an error.</p>
  <p>Here is the code for my model below (or here : <a href="https://i.stack.imgur.com/En3QK.png" rel="nofollow noreferrer">code for my model</a>):</p>
  <pre><code>input_layer = layers.Input(shape=(MAX_SENTENCE,))
  
  model = layers.Embedding(WORD_COUNT, DENSE_EMBEDDING, embeddings_initializer=&quot;uniform&quot;, input_length=MAX_SENTENCE)(input_layer)
  
  model = layers.Bidirectional(layers.LSTM(LSTM_UNITS, recurrent_dropout=LSTM_DROPOUT, return_sequences=True))(model)
  
  model = layers.TimeDistributed(layers.Dense(DENSE_UNITS, activation=&quot;relu&quot;))(model)
  
  crf_layer = CRF(units=TAG_COUNT)
  
  output_layer = crf_layer(model)
  
  ner_model = Model(input_layer, output_layer)
  
  loss = losses.crf_loss
  
  acc_metric = metrics.crf_accuracy
  
  opt = tf.keras.optimizers.Adam(learning_rate=0.001)
  
  ner_model.compile(optimizer=opt, loss=loss, metrics=[acc_metric])
  
  ner_model.summary()
  </code></pre>
  <p>Then after fitting the model, I get the following error:</p>
  <pre><code>AttributeError: 'Tensor' object has no attribute '_keras_history' ([error message for google colab][2])
  </code></pre>
  <p>Here is the list of my dependencies :<a href="https://i.stack.imgur.com/4GxvR.png" rel="nofollow noreferrer">Dependencies</a></p>
  <p><strong>Can someone help me out?</strong></p>