NeuralDialog-CVAE
NeuralDialog-CVAE copied to clipboard
How can I ignore <unk> tokens while decoding?
Hi, how can I ignore unk tokens while decoding? It probably just means setting the weight to zero.
So I want to do something like this:
if ignore_unk:
next_probs[:, self.unk_id] = 0
How can I do this in your code?
Thanks.
You can probably modify the decoding function inside: NeuralDialog-CVAE/models/decoder_fn_lib.py
Is there a way you can implement that? I don't know how to do that myself.
?