Closed Janebily closed 3 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
).
no activity -> closing the issue Feel free to reopen if you need further assistance.
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