-
Notifications
You must be signed in to change notification settings - Fork 49
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
numpy.AxisError: axis 1 is out of bounds for array of dimension 1 #18
Comments
Hmm, difficult to tell what's wrong. What did you do exactly? |
I trained the network using train.py and saved the weight model ,also predicted an audio file .But when I'm trying to run the evaluate code the above error is showing .I don't understand what's wrong . |
I also don't know what's wrong. I can only advise you to do some debugging and determine why the array |
Mmmm....When I check shape of probabilities using np.shape(probabilities) it gives (0,) . |
Seems, that your model does not return any predictions. You could check that your are using the correct model and that your model gets some input at all. |
I found that it's not loading test_data_dir in to the evaluate.py....no issues with the validation_data_dir .Can you please help me to solve this issue? |
did you adapt your config accordingly? |
yes... |
I have another doubt...If we trying to normalize the audio loudness using neg23.py (which is in tools folder) is it change the duration of the audio files? Because when I'm trying to normalize my audio files of duration 10sec each using neg23.py after running the code the duration of each audio files changes to 6sec. I have no idea whats happening ....Can you please tell where I should change so that I could get audio files of duration 10sec. |
Can you please share me what is the purpose of loudness normalization in this language identification task or why we use it?What happens if we skip that step? (advantage and disadvantage of using loudness normalization) ...I don't have any idea about it that's why..._ Actually when I tried to obtain spectrogram of audio files after normalization and segmentation (first I did normalization and then segmentation) I'm unable to process it ,shows Index error:list index out of range .But when I tried to obtain spectrogram after segmentation and normalization (first I did segmentation and then normalization )I'm able to obtain the spectrogram images....I'm unable find the logic behind that could you please help me.. |
Can you check your numpy version once, whether it matches the requirements. If that is correct, try changing the code for evaluating the argmax of the array,which suits your probabilities variable. |
While running the evaluate.py code I'm getting the following error. I'm using ubuntu (18.04) terminal
Traceback (most recent call last):
File "evaluate.py", line 66, in
evaluate(cli_args)
File "evaluate.py", line 53, in evaluate
y_pred = np.argmax(probabilities, axis=1)
File "<array_function internals>", line 6, in argmax
File "/home/bini/.local/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 1153, in argmax
return _wrapfunc(a, 'argmax', axis=axis, out=out)
File "/home/bini/.local/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 58, in _wrapfunc
return _wrapit(obj, method, *args, **kwds)
File "/home/bini/.local/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 47, in _wrapit
result = getattr(asarray(obj), method)(*args, **kwds)
numpy.AxisError: axis 1 is out of bounds for array of dimension 1
The text was updated successfully, but these errors were encountered: