-
Notifications
You must be signed in to change notification settings - Fork 125
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
Error during Inference #19
Comments
Hi, can you delete the 'test_x_list.p' from the data directory and try again? Also, which version of tensorflow are you using? |
Hi betagon, You should not rename it to the original file. The code stores the file path and the file length of each .wav file in test_x_list.p. If you delete test_x_list.p, then the code will create it again correctly. Just add the files you want to set/test_noisy_speech (without renaming). If you get an error, try and delete data/test_x_list.py to recreate the test list Hope this helps |
That was it.
Also, I had to resample audio files to the following format in order to make it work: sox input.wav -r 16000 -b 16 output.wav
# check if output.wav has 256kbps, if it has 512kbps, change option -b 16 to -b 8 To install sox: Furthermore, the results I got weren't the expected and I run into errors when trying to do inference in a big file (180MB). I will open some issues later to address theses problems. Thank you for you time and effort |
@anicolson I found a problem when I add one 35s test audio to 'set/test_noisy_speech', I got this error when running command './run.sh VER="mhanet-1.1c" INFER=1 GAIN="mmse-lsa"', but it works well for short audio such as 3s: Errors may have originated from an input operation. Input Source operations connected to node functional_1/embedding/embedding_lookup: Function call stack: I will appreciate any help. |
Name: tensorflow-gpu |
@anicolson After doing this setting, everything is ok. Any way to remove this limit? |
Hi,
Sorry for the late reply, I was on leave.
If you look at run.sh, it can be seen that “max_len” (maximum number of frames) is 2048. This is the maximum length for the learned positional encoding. You can increase this, however, a new model must be trained. Sorry for the inconvenience.
[cid:image001.png@01D6E277.1EF078F0]
Hope this helps,
Aaron.
From: lipingping <notifications@github.com>
Sent: Tuesday, 29 December 2020 7:43 PM
To: anicolson/DeepXi <DeepXi@noreply.github.com>
Cc: Aaron Nicolson <aaron.nicolson@griffithuni.edu.au>; Mention <mention@noreply.github.com>
Subject: Re: [anicolson/DeepXi] Error during Inference (#19)
@anicolson<https://github.com/anicolson> I found a problem when I add one 35s test audio to 'set/test_noisy_speech', I got this error when running command './run.sh VER="mhanet-1.1c" INFER=1 GAIN="mmse-lsa"', but it works well for short audio such as 3s:
`100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 3.01it/s]
(1, 2225, 257)
(1, 2225, 257)
(1,)
Performing inference...
2020-12-29 17:33:16.576687: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudnn.so.7
2020-12-29 17:33:18.438092: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcublas.so.10
Traceback (most recent call last):
File "main.py", line 92, in
saved_data_path=args.saved_data_path,
File "/home/dell/users/lpp/ns/DeepXi/deepxi/model.py", line 277, in infer
tgt_hat_batch = self.model.predict(inp_batch, verbose=1)
File "/home/dell/.local/lib/python3.7/site-packages/tensorflow/python/keras/engine/training.py", line 130, in _method_wrapper
return method(self, *args, **kwargs)
File "/home/dell/.local/lib/python3.7/site-packages/tensorflow/python/keras/engine/training.py", line 1599, in predict
tmp_batch_outputs = predict_function(iterator)
File "/home/dell/.local/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py", line 780, in call
result = self._call(*args, **kwds)
File "/home/dell/.local/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py", line 846, in _call
return self._concrete_stateful_fn._filtered_call(canon_args, canon_kwds) # pylint: disable=protected-access
File "/home/dell/.local/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 1848, in _filtered_call
cancellation_manager=cancellation_manager)
File "/home/dell/.local/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 1924, in _call_flat
ctx, args, cancellation_manager=cancellation_manager))
File "/home/dell/.local/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 550, in call
ctx=ctx)
File "/home/dell/.local/lib/python3.7/site-packages/tensorflow/python/eager/execute.py", line 60, in quick_execute
inputs, attrs, num_outputs)
tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found.
(0) Invalid argument: indices[0,2209] = 2209 is not in [0, 2048)
[[node functional_1/embedding/embedding_lookup (defined at /home/dell/users/lpp/ns/DeepXi/deepxi/model.py:277) ]]
(1) Invalid argument: indices[0,2209] = 2209 is not in [0, 2048)
[[node functional_1/embedding/embedding_lookup (defined at /home/dell/users/lpp/ns/DeepXi/deepxi/model.py:277) ]]
[[functional_1/embedding/embedding_lookup/_8]]
0 successful operations.
0 derived errors ignored. [Op:__inference_predict_function_2107]
Errors may have originated from an input operation.
Input Source operations connected to node functional_1/embedding/embedding_lookup:
functional_1/embedding/embedding_lookup/1639 (defined at /home/dell/.conda/envs/lpp_tf2.0/lib/python3.7/contextlib.py:112)
Input Source operations connected to node functional_1/embedding/embedding_lookup:
functional_1/embedding/embedding_lookup/1639 (defined at /home/dell/.conda/envs/lpp_tf2.0/lib/python3.7/contextlib.py:112)
Function call stack:
predict_function -> predict_function`
I will appreciate any help.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#19 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AGHGZ7TYKWM5PY25D5R7FELSXGQDDANCNFSM4KN3UPRA>.
|
Hi,
Thank you for your effort in DeepXi @anicolson .
I have been able to test it for inference with the files you provide, but when I put my own file to denoise, I got the following error:
Do you know why is it happening?
This is what I did:
set/test_noisy_speech/FB_FB10_07_voice-babble_5dB.wav
and add my own.wav
file and call it like the old one:FB_FB10_07_voice-babble_5dB.wav
.python3 deepxi.py --infer 1 --out_type y --gain mmse-lsa --ver '3f' --epoch 175 --gpu 0
Also, why does it look like there are two files to denoise ?
The text was updated successfully, but these errors were encountered: