Open IS5882 opened 3 years ago
Hello, I have the same problem with BiLSTM-CRF for aspect term extraction. Have you found a solution? Thank you in advance!
Did you switch colab to tensorflow 1? I do not think that CRF from keras-contrib works in TF2
%tensorflow_version 1.x
Here's the bug fixing https://github.com/keras-team/keras/issues/14464#issuecomment-782553777
i run this code but my 'acc' became more than 1 . why?
@lzfelix I am using google colab, its a pretty simple network that uses an LSTM-BiLSTM and CRF. But I get this error " AttributeError: 'Tensor' object has no attribute '_keras_history'", when model.fit() is called.
I understand that I shouldn't have any + operations or numpy.add() and replace them with ADD(), but this is not my case. I also tried wrapping it Lambda function but it didn't work out(I think I wasnt dong it right)
Any help would be highly appreciated
This is my code:
filepath="ner-bi-lstm-td-model-{val_acc:.2f}.hdf5" checkpoint = ModelCheckpoint(filepath, monitor='val_acc', verbose=1, save_best_only=True, mode='max') callbacks_list = [checkpoint]
This is when I wrap in Lambda function:
This the error and traceback: