linkedin / dagli

Framework for defining machine learning models, including feature generation and transformations, as directed acyclic graphs (DAGs).
BSD 2-Clause "Simplified" License
352 stars 40 forks source link

Add CRF (Conditional Random Fields) Layer #5

Open cyberbeat opened 3 years ago

cyberbeat commented 3 years ago

They are quite popular for POS/NER tagging

jeffpasternack commented 3 years ago

To clarify, you mean a CRF model regularizing the output of a neural network? Unfortunately, I don't think DeepLearning4J supports this. It may be possible to implement using DL4J's SameDiff mechanism, or by directly adjusting the backpropagated error on every iteration, but you'd (of course) also need an MRF implementation, so this quickly becomes a rather tall order :) If you're able to build this we can help you integrate it with Dagli's NN abstraction, but we don't presently plan to add this ourselves.