Skip to content

Commit 2bd8785

Browse files
varisdjlibovicky
authored andcommitted
autoregressive.py: fixed mask value in supress unk
1 parent a5ef2c4 commit 2bd8785

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

neuralmonkey/decoders/autoregressive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ def state_to_logits(state: tf.Tensor) -> tf.Tensor:
450450

451451
if self.supress_unk:
452452
unk_mask = tf.one_hot(
453-
UNK_TOKEN_INDEX, depth=len(self.vocabulary), on_value=-1e0)
453+
UNK_TOKEN_INDEX, depth=len(self.vocabulary), on_value=-1e9)
454454
logits += unk_mask
455455

456456
return logits

0 commit comments

Comments
 (0)