[QA] Fix for "dangerous-default-value" (W0102)

This commit is contained in:
Jensun Ravichandran 2021-06-01 19:24:00 +02:00
parent 2c453265fe
commit e8e803e8ef

View File

@ -155,7 +155,7 @@ class StratifiedSelectionInitializer(ClassAwareInitializer):
mask = torch.bernoulli(n1) - torch.bernoulli(n2) mask = torch.bernoulli(n1) - torch.bernoulli(n2)
return x + (self.noise * mask) return x + (self.noise * mask)
def generate(self, length, dist=[]): def generate(self, length, dist):
samples = self._get_samples_from_initializer(length, dist) samples = self._get_samples_from_initializer(length, dist)
if self.noise is not None: if self.noise is not None:
samples = self.add_noise_v1(samples) samples = self.add_noise_v1(samples)