fairseq/modules/linearized_convolution.py
Killed 0 out of 3 mutantsSurvived
Survived mutation testing. These mutants show holes in your test suite.Mutant 3285
--- fairseq/modules/linearized_convolution.py
+++ fairseq/modules/linearized_convolution.py
@@ -10,8 +10,6 @@
from .conv_tbc import ConvTBC
from fairseq.incremental_decoding_utils import with_incremental_state
-
-@with_incremental_state
class LinearizedConvolution(ConvTBC):
"""An optimized version of nn.Conv1d.
Mutant 3286
--- fairseq/modules/linearized_convolution.py
+++ fairseq/modules/linearized_convolution.py
@@ -26,7 +26,7 @@
self._linearized_weight = None
self.register_backward_hook(self._clear_linearized_weight)
- def state_dict(self, destination=None, prefix='', keep_vars=False):
+ def state_dict(self, destination=None, prefix='XXXX', keep_vars=False):
state = ConvTBC.state_dict(self, destination, prefix, keep_vars=keep_vars)
# don't store redundant _linearized_weight in checkpoints
if prefix + '_linearized_weight' in state:
Mutant 3287
--- fairseq/modules/linearized_convolution.py
+++ fairseq/modules/linearized_convolution.py
@@ -26,7 +26,7 @@
self._linearized_weight = None
self.register_backward_hook(self._clear_linearized_weight)
- def state_dict(self, destination=None, prefix='', keep_vars=False):
+ def state_dict(self, destination=None, prefix='', keep_vars=True):
state = ConvTBC.state_dict(self, destination, prefix, keep_vars=keep_vars)
# don't store redundant _linearized_weight in checkpoints
if prefix + '_linearized_weight' in state: