Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embeddings do not match original implementation #59

Open
dcmoura opened this issue Dec 4, 2023 · 0 comments
Open

Embeddings do not match original implementation #59

dcmoura opened this issue Dec 4, 2023 · 0 comments

Comments

@dcmoura
Copy link

dcmoura commented Dec 4, 2023

Hey! Thank you for porting OpenL3 to PyTorch! :-)

I run the following commands on wav files of different sample rates (8KHz and 48KHz).
The embeddings of this port do not match the embeddings of the original implementation.
Here is an example with one of your sample files.

Original OpenL3:

$ openl3 --suffix original --content-type env --audio-embedding-size 512 --input-repr mel128 audio chirp_1s.wav

(This) Torch port:

$ torchopenl3 --suffix torch --content-type env --audio-embedding-size 512 --input-repr mel128 chirp_1s.wav

MAE calculation:

$ python3 -c "import numpy as np; mae = np.abs(np.load('chirp_1s_original.npz')['embedding'] - np.load('chirp_1s_torch.npz')['embedding']).mean(); print(mae)"

1.3379873

Tried Python 3.7 and 3.8 on a AWS EC2 g5.2xlarge instance running Ubuntu 22.04.3 LTS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant