markanderson96 / DCASE2021

Submission for DCASE2021 Few Shot Learning challenge
MIT License
4 stars 1 forks source link

torchaudio have no attribute magphase? #4

Closed Noumanijaz744 closed 1 year ago

Noumanijaz744 commented 1 year ago

dear sir i am working to reproduce the results of this work but i am getting the bugs of magphase which i also didnt find in the torchaudio documentation ? can you please elaborate that is their any alternative command for this in the new version of torch audio ?

markanderson96 commented 1 year ago

The magphase function was removed in Torchaudio 0.11 onward. But it was really just a utility function that returned two well known operations to find the phase and magnitude of a complex number.

Can be quite easily replicated by the following formulae (expanding them to take tensors) https://en.wikipedia.org/wiki/Complex_number#Polar_complex_plane

Torch has recently extended complex number support so this may also be of interest https://pytorch.org/docs/stable/complex_numbers.html#angle-and-abs

Also thanks for the interest in the work, if you use it in research please cite us!

@techreport{Anderson2021,
    Author = "Anderson, Mark and Harte, Naomi",
    title = "Bioacoustic Event Detection with Prototypical Networks and Data Augmentation",
    institution = "DCASE2021 Challenge",
    year = "2021",
    month = "June",
}
markanderson96 commented 1 year ago

Torch/Torchaudio and Pytorch Lightning have changed significantly since this codes release, so using a virtual environment and installing the packages from requirements.txt is recommended.

Noumanijaz744 commented 1 year ago

thank you so much for your reply can you please tell me which version of python have you used for implementing this task because i have tried to use python 3.8 it giving me the incompatibility issue while installing the packages from the requirements.txt file? thank you so much for your time

Best Regards Nouman Ijaz Research Scholar , South China University of Technology, Guangzhou China.

On Wed, Dec 7, 2022 at 8:11 PM Mark Anderson @.***> wrote:

Torch/Torchaudio and Pytorch Lightning have changed significantly since this codes release, so using a virtual environment and installing the packages from requirements.txt is recommended.

— Reply to this email directly, view it on GitHub https://github.com/markanderson96/DCASE2021/issues/4#issuecomment-1341109702, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP5BYIMCXQA6IMBT6JBX3PTWMCSKHANCNFSM6AAAAAASWZHE54 . You are receiving this because you authored the thread.Message ID: @.***>

markanderson96 commented 1 year ago

I'm not sure which, but it was likely python 3.7

Noumanijaz744 commented 1 year ago

after having requirements.txt library installation their is still the issue exist.

Best Regards Nouman Ijaz Research Scholar , South China University of Technology, Guangzhou China.

On Tue, Dec 13, 2022 at 4:50 PM Mark Anderson @.***> wrote:

I'm not sure which, but it was likely python 3.7

— Reply to this email directly, view it on GitHub https://github.com/markanderson96/DCASE2021/issues/4#issuecomment-1348353981, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP5BYIODPQEX4RJ2FBMMLP3WNBPJ3ANCNFSM6AAAAAASWZHE54 . You are receiving this because you authored the thread.Message ID: @.***>

markanderson96 commented 1 year ago

If its an issue running the code, can you post the traceback? You can implement the magphase function manually using the information here.

If its an issue with libraries, I'm afraid I no longer know which version of python was used as the environment has been deleted. Alternatively you can manually resolve the dependencies (this requires much more work unfortunately)