Aku Rouhe
commited on
Commit
·
bf22012
1
Parent(s):
85046ed
Fix implementation
Browse files
custom.py
CHANGED
|
@@ -4,7 +4,7 @@ import speechbrain as sb
|
|
| 4 |
class FeatureScaler(torch.nn.Module):
|
| 5 |
def __init__(self, num_in, scale):
|
| 6 |
super().__init__()
|
| 7 |
-
self.scaler = torch.
|
| 8 |
|
| 9 |
def forward(x):
|
| 10 |
return x * self.scaler
|
|
|
|
| 4 |
class FeatureScaler(torch.nn.Module):
|
| 5 |
def __init__(self, num_in, scale):
|
| 6 |
super().__init__()
|
| 7 |
+
self.scaler = torch.eye(num_in) * scale
|
| 8 |
|
| 9 |
def forward(x):
|
| 10 |
return x * self.scaler
|