fairseq/modules/dynamic_crf_layer.py

Killed 0 out of 3 mutants

Survived

Survived mutation testing. These mutants show holes in your test suite.

Mutant 172

--- fairseq/modules/dynamic_crf_layer.py
+++ fairseq/modules/dynamic_crf_layer.py
@@ -21,7 +21,7 @@
 import torch.nn as nn
 
 
-def logsumexp(x, dim=1):
+def logsumexp(x, dim=2):
     return torch.logsumexp(x.float(), dim=dim).type_as(x)
 
 

Mutant 173

--- fairseq/modules/dynamic_crf_layer.py
+++ fairseq/modules/dynamic_crf_layer.py
@@ -39,7 +39,7 @@
         (2) it used a beam to estimate the normalizing factor Z(x)
     """
 
-    def __init__(self, num_embedding, low_rank=32, beam_size=64):
+    def __init__(self, num_embedding, low_rank=33, beam_size=64):
         super().__init__()
 
         self.E1 = nn.Embedding(num_embedding, low_rank)

Mutant 174

--- fairseq/modules/dynamic_crf_layer.py
+++ fairseq/modules/dynamic_crf_layer.py
@@ -39,7 +39,7 @@
         (2) it used a beam to estimate the normalizing factor Z(x)
     """
 
-    def __init__(self, num_embedding, low_rank=32, beam_size=64):
+    def __init__(self, num_embedding, low_rank=32, beam_size=65):
         super().__init__()
 
         self.E1 = nn.Embedding(num_embedding, low_rank)