facebookresearch / deepcluster

Deep Clustering for Unsupervised Learning of Visual Features
Other
1.69k stars 325 forks source link

Hey, can you please share how you have solved this problem because I am also getting the same type of error which m not able to solve.hope you can help me out. Thank you. #79

Closed Janebily closed 3 years ago

Janebily commented 4 years ago

Hey, can you please share how you have solved this problem because I am also getting the same type of error which m not able to solve.hope you can help me out. Thank you. File "main.py", line 301, in train(epoch) File "main.py", line 107, in train _, neighbor = torch.topk(dist.data,num_neighbor+1,largest=False) RuntimeError: invalid argument 5: k not in range for dimension at /opt/conda/conda-bld/pytorch_1579022034529/work/aten/src/THC/generic/THCTensorTopK.cu:23

Originally posted by @rupaliasma in https://github.com/facebookresearch/deepcluster/issues/48#issuecomment-590408443

mathildecaron31 commented 4 years ago

Hi @Janebily

What is the size of dist.data? I think the error occurs because dist.data has less elements than k (num_neighbor + 1).

mathildecaron31 commented 3 years ago

no activity -> closing the issue Feel free to reopen if you need further assistance.