question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

amplitude normalization in create_fb_matrix

See original GitHub issue

🐛 Not necessarily a Bug

Not exactly a bug, but I think it makes more sense if the triangular Mel filterbanks are area-normalized, as opposed to the current behavior where they are height-normalized.

To Reproduce / Expected behavior

Steps to reproduce the behavior:

import matplotlib.pyplot as plt
import torchaudio
import librosa

plt.figure(figsize=(16, 8))
plt.subplot(2, 1, 1)
plt.plot(torchaudio.transforms.MelScale(n_stft=1025, sample_rate=16000).fb.detach().cpu().numpy())
plt.title('torchaudio Mel filterbanks')

plt.subplot(2, 1, 2)
plt.plot(librosa.filters.mel(sr=16000, n_fft=2048).transpose())
plt.title('librosa Mel filterbanks')
plt.show()

image

The former has an advantage of preserving the energy similar to the STFT, while the latter keeps the overall spectral envelope unchanged.

If this is an intended behavior, feel free to close this issue. Thanks!

Environment

  • What commands did you used to install torchaudio (conda/pip/build from source)?

I did pip install torchaudio -f https://download.pytorch.org/whl/torch_stable.html, following README.md

  • What does torchaudio.__version__ print? (If applicable)

‘0.3.0’

Please copy and paste the output from our environment collection script.

Collecting environment information...
PyTorch version: 1.2.0
Is debug build: No
CUDA used to build PyTorch: 10.0.130

OS: Ubuntu 16.04.5 LTS
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
CMake version: version 3.11.1

Python version: 3.7
Is CUDA available: Yes
CUDA runtime version: 10.0.130
GPU models and configuration:
GPU 0: Tesla V100-SXM2-16GB
GPU 1: Tesla V100-SXM2-16GB
GPU 2: Tesla V100-SXM2-16GB
GPU 3: Tesla V100-SXM2-16GB
GPU 4: Tesla V100-SXM2-16GB
GPU 5: Tesla V100-SXM2-16GB
GPU 6: Tesla V100-SXM2-16GB
GPU 7: Tesla V100-SXM2-16GB

Nvidia driver version: 410.79
cuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.4.2

Versions of relevant libraries:
[pip3] numpy==1.16.5
[pip3] pytorch-memlab==0.0.3
[pip3] torch==1.2.0
[pip3] torch-bst==0.0.0
[pip3] torch-data==0.0.1
[pip3] torchaudio==0.3.0
[pip3] torchvision==0.4.0
[conda] blas                      1.0                         mkl
[conda] faiss-gpu                 1.5.3            py37h1a5d453_0    pytorch
[conda] mkl                       2019.4                      243
[conda] mkl-service               2.3.0            py37he904b0f_0
[conda] mkl_fft                   1.0.14           py37ha843d7b_0
[conda] mkl_random                1.0.2            py37hd81dba3_0
[conda] pytorch-memlab            0.0.3                    pypi_0    pypi
[conda] torch                     1.2.0                    pypi_0    pypi
[conda] torch-bst                 0.0.0                     dev_0    <develop>
[conda] torch-data                0.0.1                     dev_0    <develop>
[conda] torchaudio                0.3.0                    pypi_0    pypi
[conda] torchvision               0.4.0                    pypi_0    pypi

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
keunwoochoicommented, Dec 7, 2019

+1 for this!

2reactions
vincentqbcommented, May 13, 2020

This is implemented in #589.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Consensus for experimental design in electromyography ...
The general purpose of normalization of EMG amplitude is to enable comparisons between participants, muscles, measurement sessions or electrode positions.
Read more >
Steps for computing the normalized amplitude matrix and the ...
Steps for computing the normalized amplitude matrix and the channel dispersion vector for Huber mean normalization. A similar procedure was used for other ......
Read more >
How to normalize signal to have mean=0 and amplitude 0 to 1
If you have a dataset where the mean is zero and the amplitude is within the interval [0 1], then the entire dataset...
Read more >
Consensus for experimental design in ... - Find an Expert
The general purpose of normalization of EMG amplitude is to enable comparisons between participants, muscles, measurement sessions or electrode positions.
Read more >
Consensus for experimental design in electromyography (CEDE ...
This matrix is intended to help researchers when selecting, reporting and interpreting EMG amplitude data. AB - The general purpose of normalization of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found