keras-team / keras-contrib

Keras community contributions
MIT License
1.58k stars 650 forks source link

CRF is broken with Theano backend #131

Open neingeist opened 7 years ago

neingeist commented 7 years ago

With Theano (git version 8f3f254 due to compiler issues) the CRF layer is broken. Unfortunately I am unable to test this with the current stable Theano. Theano git runs other recurrent models without problems.

% python conll2000_chunking_crf.py
Using Theano backend.
[...]
Epoch 1/10
8936/8936 [==============================] - 15s - loss: nan - viterbi_acc: 0.0098 - val_loss: nan - val_viterbi_acc: 0.0093
Epoch 2/10
8936/8936 [==============================] - 15s - loss: nan - viterbi_acc: 0.0098 - val_loss: nan - val_viterbi_acc: 0.0093
[...]

With the TensorFlow backend, the example runs perfectly on my machine.

joelkuiper commented 7 years ago

Can confirm, same on my machine

neingeist commented 7 years ago

@joelkuiper Which Theano version are you using?

neingeist commented 7 years ago

The problem is also there with Theano-rel-0.10.0beta1.

Euruson commented 6 years ago

I met the same problem with Keras 2.1.5 and Theano 1.0.1 on Win10. image

skhong0831 commented 6 years ago

I have the same problem with keras 2.1.5 and theano 1.0.1 on ubuntu 16.