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

RuntimeError: Could not infer dtype of numpy.float32 #26

Closed
YoungJay0612 opened this issue Jun 21, 2022 · 10 comments
Closed

RuntimeError: Could not infer dtype of numpy.float32 #26

YoungJay0612 opened this issue Jun 21, 2022 · 10 comments

Comments

@YoungJay0612
Copy link

Hello, sorry to bother you. I have met a problem. I have configured the environment as described in the readme file, but the program is wrong when I run the run_predict_file.py, RuntimeError: Could not infer dtype of numpy.float32. Is the version of some libs are incorrectly? I have tried serveral versions of numpy, but it doesn't work and displays the same error.
Looking forward to your reply!

@gabrielmittag
Copy link
Owner

Hi, there is no run_predict_file.py, did you mean run_predict.py? Which arguments did you use? Here is an example on how to use it from the readme:
python run_predict.py --mode predict_file --pretrained_model weights/nisqa.tar --deg /path/to/wav/file.wav --output_dir /path/to/dir/with/results

@YoungJay0612
Copy link
Author

Sorry,I have written wrong in the commnet. But actually I run the run_predict.py as the example told. Here is the results:
nisaq

@gabrielmittag
Copy link
Owner

Hm I am not sure, could you share your wav file so I could test it? Or you could try one of the wav files from the NISQA dataset

@YoungJay0612
Copy link
Author

test.zip
hello,thanks so much. the test.zip is the wav file I used, you can have a try. And I will ttry to test the files from the NISQA dataset to confirm.

@YoungJay0612
Copy link
Author

Here is the result of the DEMAND data DLIVING_16k chn01.wav. The result is the same.
nisaq2

@gabrielmittag
Copy link
Owner

I just made a fresh install of the conda environment on an Ubuntu machine and cannot reproduce the error with the test.wav. Are you sure you are using the latest master branch? Did you install the environment with conda env create -f env.yml? Could you maybe double check which pytorch version you have installed in your environment?

@YoungJay0612
Copy link
Author

As you mentioned, I have tried again. The version of the pytorch is as follows, and cannot find a version of 1.10.1 with pip install.
nisaq3

@gabrielmittag
Copy link
Owner

Hm that is kind of strange. I guess there must be something weird with your installation because the version should definitely be available with pip

@YoungJay0612
Copy link
Author

It's really unimaginable. I reinstall the torch==1.10.1 today as what I have did yesterday, and sucess in one fell swoop. Now It can be running with your example script. Thanks a lot for your patient reply. Now I can test it any way I want.

@gabrielmittag
Copy link
Owner

No worries, great that it works for you now

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

2 participants