-
Notifications
You must be signed in to change notification settings - Fork 31
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
Errors occur when running 'bash train_attMPTI.sh' #26
Comments
I am also getting exactly same error. |
I get a similar error too. Did anyone get a solution to this error? |
It may be something wrong with faiss. I've managed to run the code successfully in another environment, but it gives me an error in a higher version of pytorch and cuda environment on a 30-series GPU. Now I get wrong knn_index. Further troubleshooting revealed that it was not a faiss error, but a large number of "nan" in the tensor of node_feat, which comes from the prototype. I have solved this problem. It comes from the function "pytorch.nn.functional.pairwise_distance". This function behaves differently in different versions of pytorch. If you use pytorch of higher version, you can refer to my solution. Note that every use of the "pairwise_distance" function requires modification.
|
@WeiTang-code Your answer is very helpful. |
Errors are listed as below.
Traceback (most recent call last):
File "/home/liuxuanchen/Develop/few-shot-point-cloud/attMPTI/main.py", line 101, in
train(args)
File "/home/liuxuanchen/Develop/few-shot-point-cloud/attMPTI/runs/mpti_train.py", line 58, in train
loss, accuracy = MPTI.train(data)
File "/home/liuxuanchen/Develop/few-shot-point-cloud/attMPTI/models/mpti_learner.py", line 63, in train
query_logits, loss= self.model(support_x, support_y, query_x, query_y)
File "/home/liuxuanchen/anaconda3/envs/torch/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1194, in call_impl
return forward_call(*input, **kwargs)
File "/home/liuxuanchen/Develop/few-shot-point-cloud/attMPTI/models/mpti.py", line 107, in forward
A = self.calculateLocalConstrainedAffinity(node_feat, k=self.k_connect)
File "/home/liuxuanchen/Develop/few-shot-point-cloud/attMPTI/models/mpti.py", line 258, in calculateLocalConstrainedAffinity
A = A.scatter(1, I, knn_similarity)
RuntimeError: Expected index [4396, 200] to be smaller than self [4396, 4396] apart from dimension 1 and to be smaller size than src [4396, 192]
The text was updated successfully, but these errors were encountered: