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

TypeError: '<=' not supported between instances of 'str' and 'int' #23

Open
wen0320 opened this issue Apr 27, 2023 · 2 comments
Open

TypeError: '<=' not supported between instances of 'str' and 'int' #23

wen0320 opened this issue Apr 27, 2023 · 2 comments

Comments

@wen0320
Copy link

wen0320 commented Apr 27, 2023

Hi,When I tried to duplicate your code,in 7.initialize and attach memory bank after warmup:
python3 attach_memory_bank.py -c configs/ljs.json --weights_path logs/[run_name]/G_xxx.pth.The following problems arise
12199 torch.Size([192, 660])
12299 torch.Size([192, 859])
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'

@Aliasgarsaifee
Copy link

Aliasgarsaifee commented Apr 27, 2023

It is because of sklearn version issue. Use latest version >=1.24.0

@wen0320
Copy link
Author

wen0320 commented Apr 27, 2023

Thank you for your reply.Hello, the latest version of this package sklearn (scikit-learn 1.2.2) is 1.2.2, there is no version 1.24.0. And the highest version in the mirror source is 1.0.2.

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