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

About the time complexity of attach_memory_bank.py #17

Open
TinaChen95 opened this issue Apr 8, 2023 · 2 comments
Open

About the time complexity of attach_memory_bank.py #17

TinaChen95 opened this issue Apr 8, 2023 · 2 comments

Comments

@TinaChen95
Copy link

Hi,

I'm trying to reproduce the results on ljspeech dataset, and I noticed that the code in this section (

kmeans = KMeans(n_clusters=1000, random_state=0, n_init="auto").fit(X)
) takes a very long time to execute. It appears that the shape of X is (7066362, 192), which leads to a high computational complexity when calculating the distances.

I was wondering if you could share with me how much time it takes for this code to run on your machine?
Thanks

@Aliasgarsaifee
Copy link

Yeah got same issue, for me it had taken around around 10 hours on machine. It runs on CPU that's why it is more slower. And this time is for n_init=1 which is running 1 iteration equivalent to n_init="auto".

@wen0320
Copy link

wen0320 commented Apr 27, 2023

Hi,do you have follow question:

12399 torch.Size([192, 651])
(7066362, 192)
Traceback (most recent call last):
File "attach_memory_bank.py", line 174, in
centers = k_means(zs)
File "attach_memory_bank.py", line 132, in k_means
kmeans = KMeans(n_clusters=1000, random_state=0, n_init="auto").fit(X)
File "/home/WeiWB/anaconda3/envs/tts/lib/python3.7/site-packages/sklearn/cluster/_kmeans.py", line 1146, in fit
self._check_params(X)
File "/home/WeiWB/anaconda3/envs/tts/lib/python3.7/site-packages/sklearn/cluster/_kmeans.py", line 937, in _check_params
if self.n_init <= 0:
TypeError: '<=' not supported between instances of 'str' and 'int'

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

3 participants