fairseq/modules/lightweight_convolution.py
Killed 0 out of 11 mutantsSurvived
Survived mutation testing. These mutants show holes in your test suite.Mutant 214
--- fairseq/modules/lightweight_convolution.py
+++ fairseq/modules/lightweight_convolution.py
@@ -14,7 +14,7 @@
def LightweightConv(input_size, kernel_size=1, padding_l=None, num_heads=1,
- weight_dropout=0., weight_softmax=False, bias=False):
+ weight_dropout=1.0, weight_softmax=False, bias=False):
if torch.cuda.is_available():
try:
from fairseq.modules.lightconv_layer import LightconvLayer
Mutant 215
--- fairseq/modules/lightweight_convolution.py
+++ fairseq/modules/lightweight_convolution.py
@@ -14,7 +14,7 @@
def LightweightConv(input_size, kernel_size=1, padding_l=None, num_heads=1,
- weight_dropout=0., weight_softmax=False, bias=False):
+ weight_dropout=0., weight_softmax=True, bias=False):
if torch.cuda.is_available():
try:
from fairseq.modules.lightconv_layer import LightconvLayer
Mutant 216
--- fairseq/modules/lightweight_convolution.py
+++ fairseq/modules/lightweight_convolution.py
@@ -14,7 +14,7 @@
def LightweightConv(input_size, kernel_size=1, padding_l=None, num_heads=1,
- weight_dropout=0., weight_softmax=False, bias=False):
+ weight_dropout=0., weight_softmax=False, bias=True):
if torch.cuda.is_available():
try:
from fairseq.modules.lightconv_layer import LightconvLayer
Mutant 217
--- fairseq/modules/lightweight_convolution.py
+++ fairseq/modules/lightweight_convolution.py
@@ -54,7 +54,7 @@
'''
def __init__(self, input_size, kernel_size=1, padding=0, num_heads=1,
- weight_softmax=False, bias=False, weight_dropout=0.):
+ weight_softmax=True, bias=False, weight_dropout=0.):
super().__init__()
self.input_size = input_size
self.kernel_size = kernel_size
Mutant 218
--- fairseq/modules/lightweight_convolution.py
+++ fairseq/modules/lightweight_convolution.py
@@ -54,7 +54,7 @@
'''
def __init__(self, input_size, kernel_size=1, padding=0, num_heads=1,
- weight_softmax=False, bias=False, weight_dropout=0.):
+ weight_softmax=False, bias=True, weight_dropout=0.):
super().__init__()
self.input_size = input_size
self.kernel_size = kernel_size
Mutant 219
--- fairseq/modules/lightweight_convolution.py
+++ fairseq/modules/lightweight_convolution.py
@@ -54,7 +54,7 @@
'''
def __init__(self, input_size, kernel_size=1, padding=0, num_heads=1,
- weight_softmax=False, bias=False, weight_dropout=0.):
+ weight_softmax=False, bias=False, weight_dropout=1.0):
super().__init__()
self.input_size = input_size
self.kernel_size = kernel_size
Mutant 220
--- fairseq/modules/lightweight_convolution.py
+++ fairseq/modules/lightweight_convolution.py
@@ -100,8 +100,6 @@
return output
-
-@with_incremental_state
class LightweightConv1dTBC(nn.Module):
'''Lightweight Convolution assuming the input is TxBxC
Args:
Mutant 221
--- fairseq/modules/lightweight_convolution.py
+++ fairseq/modules/lightweight_convolution.py
@@ -123,7 +123,7 @@
bias: the learnable bias of the module of shape `(input_size)`
'''
def __init__(self, input_size, kernel_size=1, padding_l=None, num_heads=1,
- weight_dropout=0., weight_softmax=False, bias=False):
+ weight_dropout=1.0, weight_softmax=False, bias=False):
super().__init__()
self.input_size = input_size
self.kernel_size = kernel_size
Mutant 222
--- fairseq/modules/lightweight_convolution.py
+++ fairseq/modules/lightweight_convolution.py
@@ -123,7 +123,7 @@
bias: the learnable bias of the module of shape `(input_size)`
'''
def __init__(self, input_size, kernel_size=1, padding_l=None, num_heads=1,
- weight_dropout=0., weight_softmax=False, bias=False):
+ weight_dropout=0., weight_softmax=True, bias=False):
super().__init__()
self.input_size = input_size
self.kernel_size = kernel_size
Mutant 223
--- fairseq/modules/lightweight_convolution.py
+++ fairseq/modules/lightweight_convolution.py
@@ -123,7 +123,7 @@
bias: the learnable bias of the module of shape `(input_size)`
'''
def __init__(self, input_size, kernel_size=1, padding_l=None, num_heads=1,
- weight_dropout=0., weight_softmax=False, bias=False):
+ weight_dropout=0., weight_softmax=False, bias=True):
super().__init__()
self.input_size = input_size
self.kernel_size = kernel_size
Mutant 224
--- fairseq/modules/lightweight_convolution.py
+++ fairseq/modules/lightweight_convolution.py
@@ -146,7 +146,7 @@
if self.bias is not None:
nn.init.constant_(self.bias, 0.)
- def forward(self, x, incremental_state=None, unfold=False):
+ def forward(self, x, incremental_state=None, unfold=True):
'''Assuming the input, x, of the shape T x B x C and producing an output in the shape T x B x C
args:
x: Input of shape T x B x C, i.e. (timesteps, batch_size, input_size)