Skip to content

crf_decode_forward misses key RNN kwarg #2639

Closed
@tgsmith61591

Description

@tgsmith61591

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions