[QA] Fix for "redefined-builtin" (W0622)

This commit is contained in:
Jensun Ravichandran 2021-06-02 00:07:44 +02:00
parent 2eb7b05653
commit 1e0a8392a2

View File

@ -71,15 +71,15 @@ class ZerosInitializer(DimensionAwareInitializer):
class UniformInitializer(DimensionAwareInitializer): class UniformInitializer(DimensionAwareInitializer):
def __init__(self, dims, min=0.0, max=1.0): def __init__(self, dims, minimum=0.0, maximum=1.0):
super().__init__(dims) super().__init__(dims)
self.min = min self.minimum = minimum
self.max = max self.maximum = maximum
def generate(self, length): def generate(self, length):
gen_dims = (length, ) + self.components_dims gen_dims = (length, ) + self.components_dims
return torch.ones(gen_dims).uniform_(self.min, self.max) return torch.ones(gen_dims).uniform_(self.minimum, self.maximum)
class DataAwareInitializer(ComponentsInitializer): class DataAwareInitializer(ComponentsInitializer):