... | ... | @@ -14,7 +14,7 @@ |
|
|
|
|
|
# Normalize the magnitude of spectrogram before begin fed into the neural network
|
|
|
|
|
|
## normalized to values between 0 and 1
|
|
|
## normalized values between 0 and 1
|
|
|
```
|
|
|
# between 0 and 1
|
|
|
x_max = torch.amax(X_input)
|
... | ... | @@ -23,6 +23,25 @@ y_max = torch.amax(y_input) |
|
|
y_input = y_input / y_max
|
|
|
|
|
|
```
|
|
|
and comment out the line in the model
|
|
|
```
|
|
|
# x = self.positive(x)
|
|
|
```
|
|
|
|
|
|
|
|
|
## normalized values with mean and the standard deviation
|
|
|
```
|
|
|
x_mean = torch.mean(X_input)
|
|
|
x_std = torch.mean(X_input)
|
|
|
X_input = X_input - x_mean
|
|
|
X_input = X_input / x_std
|
|
|
y_mean = torch.mean(y_input)
|
|
|
y_std = torch.std(y_input)
|
|
|
y_input = y_input - y_mean
|
|
|
y_input = y_input / y_std
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
# Increase the overlapping segments to have more number of the data set
|
|
|
|
... | ... | |