fairseq/modules/grad_multiply.py
Killed 0 out of 2 mutantsSurvived
Survived mutation testing. These mutants show holes in your test suite.Mutant 2542
--- fairseq/modules/grad_multiply.py
+++ fairseq/modules/grad_multiply.py
@@ -7,7 +7,7 @@
class GradMultiply(torch.autograd.Function):
- @staticmethod
+
def forward(ctx, x, scale):
ctx.scale = scale
res = x.new(x)
Mutant 2543
--- fairseq/modules/grad_multiply.py
+++ fairseq/modules/grad_multiply.py
@@ -13,7 +13,6 @@
res = x.new(x)
return res
- @staticmethod
def backward(ctx, grad):
return grad * ctx.scale, None