le module 'keras.backend' n'a pas d'attribut 'dot'

29 views
Skip to first unread message

Ben MOSBAH

unread,
May 5, 2024, 5:41:44 PMMay 5
to Keras-users
Bonjour tout le monde 
I was building Bi-LSTM CRF to do NER task.
but i cant resolve  the probleme:
 When it comes to  :
monmodel= model.fit(
    X_train,
    np.array(y_train),
    batch_size=batch_size,
    epochs=epochs,
    validation_split=0.1,
    callbacks=[checkpointer])  .         The error pop up : AttributeError                            Traceback (most recent call last)
<ipython-input-43-f7b1ef4826d9> in <cell line: 1>()
----> 1 history = model.fit(
      2     X_train,
      3     np.array(y_train),
      4     batch_size=batch_size,
      5     epochs=epochs,

2 frames
/usr/local/lib/python3.10/dist-packages/keras_contrib/layers/crf.py in viterbi_decoding(self, X, mask)
    557
    558     def viterbi_decoding(self, X, mask=None):
--> 559         input_energy = self.activation(K.dot(X, self.kernel) + self.bias)
    560         if self.use_boundary:
    561             input_energy = self.add_boundary_energy(

AttributeError: Exception encountered when calling CRF.call().

module 'keras.backend' has no attribute 'dot'

Arguments received by CRF.call():
  • X=tf.Tensor(shape=(None, 3000, 3), dtype=float32)
  • mask=None
Reply all
Reply to author
Forward
0 new messages