I'm implementing the NER code using BiLSTM-CRF. I took the program code from https://github.com/scionoftech/NamedEntityRecognition-BiLSTM-CRF-BERT/blob/master/ner_BiLSTM_CRF.ipynb
when running the model definition there was an error on the line crf = CRF (n_tags + 1) # CRF layer, n_tags + 1 (PAD), with the error message "ValueError: Could not interpret initializer identifier: 18"
I try to resolve it by defining the kernel initialization like def init_f(shape, dtype=None), but it doesn't work properly.
The code imports the tf2crf module from https://pypi.org/project/tf2crf/, wherein the explanation there is a tip if tensorflow> = 2.1.0 Recommend using the latest TensorFlow-addons which is compatible with your tf version. While TensorFlow that I use version 2.4.1. Is there any version of TensorFlow or add-ons used? How to solve this problem?
2.1m questions
2.1m answers
60 comments
56.9k users