-
Notifications
You must be signed in to change notification settings - Fork 615
crf_losses.py as in keras_contrib? #2363
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
Comments
Hi @afi1289, I believe that we have a crf layer however we do not have an alternative for crf losses. |
Thank you for your reply @Harsh188 |
Hi @Harsh188 , |
You can check https://github.com/xuxingya/tf2crf I don't know if @xuxingya Is interested to contribute here. |
If you won't mind, I'd like to take a stab at this. I've found a repo which implements CRF Loss. CRF Loss: https://github.com/howl-anderson/tf_crf_layer/blob/master/tf_crf_layer/loss/crf_loss.py A bit of polish, and should make for a good PR, I suppose? EDIT: |
Okay, I did some research on this. Thing is, the loss function doesn't solely depend on y_true and y_pred but also the internal variables. So, we can't use eager tensor for y_pred(since keras.contrib uses @afi1289 Further investigations revealed that, you could add a custom wrapper around our CRF class for loss as is shown here, sample tutorial here. |
@afi1289 , can this be closed as part of #1999 ? |
I am the author of this repo, and I happy to bring back the CRF accuracy feature to TFA. I will submit a PR for it when it is ready.
|
TensorFlow Addons is transitioning to a minimal maintenance and release mode. New features will not be added to this repository. For more information, please see our public messaging on this decision: Please consider sending feature requests / contributions to other repositories in the TF community with a similar charters to TFA: |
Hello, I want to ask if you there is an alternative crf_losses.py as in keras_contrib in tensorflow_addons?
The text was updated successfully, but these errors were encountered: