question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Probelm with PyTorch knn

See original GitHub issue

Hey,

thanks for the available code for DenseFusion! I want to use it for my own synthetic dataset (created with NDDS), but I’ve got some problems getting started with DenseFusion.

My System:

  • Ubuntu 18.02
  • Cuda 10.2
  • Python 3.6.9
  • PyTorch 0.4.1
  • Torchvision 0.2.2

The error: When running ./experiments/scripts/eval_linemod.sh I get the following error message:

+ set -e
+ export PYTHONUNBUFFERED=True
+ PYTHONUNBUFFERED=True
+ export CUDA_VISIBLE_DEVICES=0
+ CUDA_VISIBLE_DEVICES=0
+ python3 ./tools/eval_linemod.py --dataset_root ./datasets/linemod/Linemod_preprocessed --model trained_checkpoints/linemod/pose_model_9_0.01310166542980859.pth --refine_model trained_checkpoints/linemod/pose_refine_model_493_0.006761023565178073.pth
Traceback (most recent call last):
  File "./tools/eval_linemod.py", line 20, in <module>
    from lib.loss import Loss
  File "/home/katharina/Schreibtisch/DenseFusion/lib/loss.py", line 9, in <module>
    from lib.knn.__init__ import KNearestNeighbor
  File "/home/katharina/Schreibtisch/DenseFusion/lib/knn/__init__.py", line 7, in <module>
    from lib.knn import knn_pytorch as knn_pytorch
  File "/home/katharina/Schreibtisch/DenseFusion/lib/knn/knn_pytorch/__init__.py", line 3, in <module>
    from ._knn_pytorch import lib as _lib, ffi as _ffi
ImportError: /home/katharina/Schreibtisch/DenseFusion/lib/knn/knn_pytorch/_knn_pytorch.so: undefined symbol: state

I don’t where that error comes from. Can you help me with that issue please?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
KatharinaSchmidtcommented, Aug 19, 2020

I rebuilt the knn module like in #33 Afterwards there were some minor fixed needed (but I don’t remember them all).

0reactions
Destinycjkcommented, Jul 24, 2022

Hello! @drapado Thank you very much for your contribution! I aslo face the same problem /code/DenseFusion-Pytorch/lib/knn/knn_pytorch.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN6caffe26detail37_typeMetaDataInstance_preallocated_10E I follow the steps as you introduced in https://github.com/j96w/DenseFusion/pull/170. Do you know how to solve the problem? Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

K nearest neighbor in pytorch
Hi, I have tensor size [12936x4098] and after computing a similarity using F.cosine_similarity , get a tensor of size 12936 .
Read more >
Direct Implementation of K-Nearest neighbor (KNN) in pytorch
I think part of the problem is that faiss / pytorch integration isn't very easy and requires an obscure import that modifies behavior...
Read more >
K-NN on the MNIST dataset - PyTorch API — KeOps
K-Nearest Neighbors search ... Out: 3-NN on the full MNIST dataset: test error = 2.95% in 0.40s. ... Fancy display: looks...
Read more >
How can I use KNN, Random Forest models in Pytorch?
So I thought I could use batch feature of Pytorch . But I want to use Methods like KNN, Random Forest, Clustering except...
Read more >
ML from Scratch: K-Nearest Neighbors Classifier
For binary classification problems, the number of possible target classes is 2. On the other hand, a multi-class classification problem, as the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found