-
Notifications
You must be signed in to change notification settings - Fork 613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Conditional Random Field #22
Comments
@seanpmorgan, may I give some help on this? |
Absolutely! Please let us know if you run into any issues. As noted in the other issue, one thing to note is that the RNN cells are unified under Keras RNN in TF2. |
@seanpmorgan, thanks for your help, I will ping you if I met some issues. |
@seanpmorgan, Sorry for late interaction. So what I should do now is |
Hmmm move the code and change the tests/code in addons to match the TF2 syntax would be how I would word that. |
@seanpmorgan, Thanks for you help, and could you please give me some PR reference that I could follow? As my understanding, I should move the code to And how I should deal with the function defined in I'm appreciate for your kind comments. |
Hi @a6802739
Yes that is correct.
This is where I'm confused. You'll need to move the code from contrib, but then modify it to use the unifed RNN class in TF2. This will come with some changes to the code so that it runs correctly. To be honest, this is not the most straightforward of all the issues we need help with. It might be easier to move something that already has an example PR we can point you to. For example moving an optimizer and then you can match how LazyAdam was moved. |
@seanpmorgan , Thanks for you kind help, I will have a try then. Could you please point me the example PR and the ongoing issue about optimizer. |
How is it going on about this issue? I want to use tf.keras(2.0), but there is no CRF Layer, so that I can only use keras & keras_contrib. |
Hi @NLP-ZY thanks for bumping this. CRF is a highly requested feature and we'll make sure it's implemented prior to a TF2 release. Relevant issue: tensorflow/tensorflow#26167 |
@seanpmorgan I'll work on this. |
If need help, I familiar with CRF and I can help with the coding and testing. |
IMO this should go under tfa.text. Any objections to that? |
Yup, I was thinking the same. |
@seanpmorgan Thanks for your reply! |
@howl-anderson Some of my tests are failing because they're off from the actual values. I have my code here. I'll take a look at it later today, but if you want you could take a crack at it. |
@Squadrick Sure |
@invencode @soloice @nlp-zy We're having internal discussion about how we want to expose the CRF functionality in Addons. Would it be sufficient to only expose it as a Keras Layer, or do you have use cases were the lower level op calls would be used? |
@seanpmorgan The CRF layer in keras is good enough for me in the moment. |
The CRF layer of the tf.addons I'm working on is basically ready, but the code still needs more testing to ensure correctness and robustness. Will be submitted in the next one or two weeks. |
@howl-anderson Does your implementation use the code in #314 or is it standalone? Would you mind submitting a WIP PR so we can better plan? |
@seanpmorgan The current implementation of my CRF layer use functions from #314 . I will submit it as a WIP PR soon. I will keep you informed. |
@seanpmorgan For keep you informed, WIP PR #377 is for the CRF layer. |
Sorry to restart the discussion on this. Thanks for including CRF in TF 2.0 addons. However, it should be noted that CRF is a general methodology for any type of sequence tagging task where the prediction has to be made on each item of the sequence. This includes videos, audio, text, and even graph traversals. |
Maybe adding it directly to |
I think |
Per the RFC, we need to move CRF from contrib to addons:
This will involve moving the code and modifying test cases to run in TF2.
The text was updated successfully, but these errors were encountered: