Open imayachita opened 4 years ago
you should use one hot target
when you use
CRF(self.n_class, sparse_target=True)
can work too, sparese_target dosen't need one hot target
CRF(self.n_class, sparse_target=True)
Thanks helped a lot, after few hours of trying to solve, you saved me <3.
Hi all, I tried to use CRF layer on top of Bi-LSTM-CNN NER model on this implementation https://github.com/kamalkraj/Named-Entity-Recognition-with-Bidirectional-LSTM-CNNs
I printed
labels.shape, tokens.shape, casing.shape, char.shape
and it gave me this for the item:(146, 1, 1) (146, 1) (146, 1) (146, 1, 52)
Below is the model summary:
I got following error
Can anyone please help? Thanks!