Skip to content
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

crf_decode_forward misses key RNN kwarg #2639

Closed
tgsmith61591 opened this issue Dec 29, 2021 · 2 comments
Closed

crf_decode_forward misses key RNN kwarg #2639

tgsmith61591 opened this issue Dec 29, 2021 · 2 comments
Labels

Comments

@tgsmith61591
Copy link
Contributor

In the crf_decode_forward method, the RNN constructor is missing the zero_output_for_mask=True kwarg.

crf_fwd_cell, return_sequences=True, return_state=True, dtype=inputs.dtype

Without this argument, the provided mask will not zero out masked timesteps. Here is the relevant documentation (scroll down to the args section, as it's left out of the signature's documentation):

zero_output_for_mask
Boolean (default False). Whether the output should use zeros for the masked timesteps. Note that this field is only used when return_sequences is True and mask is provided. It can useful if you want to reuse the raw output sequence of the RNN without interference from the masked timesteps, eg, merging bidirectional RNNs.

@bhack bhack added the crf label Dec 29, 2021
@bhack
Copy link
Contributor

bhack commented Dec 29, 2021

/cc @howl-anderson

tgsmith61591 added a commit to tgsmith61591/addons that referenced this issue Dec 30, 2021
@tgsmith61591
Copy link
Contributor Author

tgsmith61591 commented Dec 30, 2021

Added a PR for this here: #2642

seanpmorgan pushed a commit that referenced this issue Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants