keras-crf-layer icon indicating copy to clipboard operation
keras-crf-layer copied to clipboard

Implementation of CRF layer in Keras.

Results 2 keras-crf-layer issues
Sort by recently updated
recently updated
newest added

Hi @Hironsan , Thanks for sharing a great project. I would like to understand the implementation to use it. I saw that your CRF's output dimension is fixed to the...

this is my model ``` model = Sequential() model.add(Bidirectional(LSTM(CONFIG.hidden_size, return_sequences=True),input_shape=(CONFIG.max_input_len,CONFIG.number_of_chars))) model.add(Dropout(CONFIG.amount_of_dropout)) model.add(TimeDistributed(Dense(n_classes, activation='softmax'),input_shape=(CONFIG.max_input_len, CONFIG.number_of_chars))) model.add(Dropout(0.2)) crf = CRFLayer() model.add(crf(inputs=[CONFIG.max_input_len,CONFIG.number_of_chars])) model.compile(loss=crf.loss, optimizer='rmsprop', metrics=['accuracy']) ``` and get a error ValueError: Layer crf_layer_1...