Closed
Description
In the crf_decode_forward
method, the RNN
constructor is missing the zero_output_for_mask=True
kwarg.
addons/tensorflow_addons/text/crf.py
Line 493 in f82a4a6
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.