-
Notifications
You must be signed in to change notification settings - Fork 61
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.float64' object cannot be interpreted as an index #4
Comments
Hi @raikar008 i am also having the same issues and i have been on it for 2 days now, want to ask if you solved it. i have tried different approaches but all to no avail. |
This error is probably due to the versions of the dependencies, and I guess rounding the float number to an integer will get things to work. |
Yes i did some research and discovered that floating point indices was finally removed from numpy 1.12. so the walk around was the cast all indices to int. data_frames = stride_tricks.as_strided( This works fine. |
@zhr1201 thanks alot i just test now with 5 noise for both training and testing and 3 clean speech for training while 2 for testing. am actually trying to know how long the training process will take, i dont have a GPU, but uses 2 CPU cores. please can you give me a rough estimated time. Also if you have a documentation of the entire process, i would really appreciate, i want to have a detailed understanding of the entire process and not just to run the code. |
@imchukwu Thanks for finding out the reason. The training time depends on the types of dataset you use. I used TIMIT and 100 types of noise generating a dataset more than 100 h of training set, and it took about a day to make the output sound reasonable. So two CPUs probably won't get things to work using such a big dataset. I don't know how long the training will take given your training set, but with such limited amount of data, the performance using different speech for training and testing won't be good. You can just test you model using the training data. And I am really sorry but I don't update the project anymore because I have two much projects to work on. |
it occurs when i use your code .it likes below but i test the code l'ibrosa; it does not have problem。can you give me some advice |
Exception in thread Thread-2:
Traceback (most recent call last):
File "/home/raikar/anaconda2/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/home/raikar/anaconda2/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "audio_reader.py", line 150, in thread_main
data.strides[1]))
File "/home/raikar/anaconda2/lib/python2.7/site-packages/numpy/lib/stride_tricks.py", line 102, in as_strided
array = np.asarray(DummyArray(interface, base=x))
File "/home/raikar/anaconda2/lib/python2.7/site-packages/numpy/core/numeric.py", line 492, in asarray
return array(a, dtype, copy=False, order=order)
TypeError: 'numpy.float64' object cannot be interpreted as an index
Exception in thread Thread-1:
Traceback (most recent call last):
File "/home/raikar/anaconda2/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/home/raikar/anaconda2/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "audio_reader.py", line 150, in thread_main
data.strides[1]))
File "/home/raikar/anaconda2/lib/python2.7/site-packages/numpy/lib/stride_tricks.py", line 102, in as_strided
array = np.asarray(DummyArray(interface, base=x))
File "/home/raikar/anaconda2/lib/python2.7/site-packages/numpy/core/numeric.py", line 492, in asarray
return array(a, dtype, copy=False, order=order)
TypeError: 'numpy.float64' object cannot be interpreted as an index
The text was updated successfully, but these errors were encountered: