Fix bug to allow down+up sampling

This commit is contained in:
Daniel Povey 2023-01-12 21:18:34 +08:00
parent 1e04c3d892
commit d3b3592986

View File

@ -908,7 +908,6 @@ class SimpleCombiner(torch.nn.Module):
dim2: int, dim2: int,
min_weight: Tuple[float, float] = (0., 0.)): min_weight: Tuple[float, float] = (0., 0.)):
super(SimpleCombiner, self).__init__() super(SimpleCombiner, self).__init__()
assert dim2 >= dim1
initial_weight1 = 0.1 initial_weight1 = 0.1
self.weight1 = nn.Parameter(torch.full((dim2,), initial_weight1)) self.weight1 = nn.Parameter(torch.full((dim2,), initial_weight1))
self.min_weight = min_weight self.min_weight = min_weight