i tryed to use crf layer on colab
Replace K.dot with tf.matmul in the crf.py file within the keras_contrib library
To this:
input_energy = self.activation(tf.matmul(X, self.kernel) + self.bias)
additional
!pip install git+https://www.github.com/keras-team/keras-contrib.git
from keras.models import Model
from keras.layers import Input, Embedding, LSTM, Bidirectional, TimeDistributed, Dense, Dropout
from keras_contrib.layers import CRF
import tensorflow as tf # Import TensorFlow
wakj TB is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.