Comments (13)
soory,I did know
from rsnet.
help!too much problems like this:
from _ext import slice_unpool_layer
ImportError: cannot import name 'slice_unpool_layer'
please ?
from rsnet.
I meet the same question:ImportError: No module named _ext?can you help me ? thank you
from rsnet.
I meet the same question:ImportError: No module named _ext?can you help me ? thank you
Hi,when I try to run your code,I find I can not compile your slice_pool_layer and slice_unpool_layer,can you send me your files have compiled files?my email is that:[email protected] forward your reply
from rsnet.
this means we should learn how to compile the .c file, hope u could see the compile method in pointnet++ which also uses .c and .cuda files.
from rsnet.
I think this importerror is from circular dependency problem. In this repository, so many modules have same name such as slice_pool_layer. To avoid this issue, I copied slice_pool_layer 'in _ext folder' outside, and changed the slice_pool_layer.py which contains SP class to slice_pool_layer2.py and in net.py, I directly imported layers.slice_unpool_layer2 as import slice_unpool_layer2. Then you can call SP layer as slice_unpool_layer2.SP().
from rsnet.
Hi there, Is there anyone who could solve the problem? I followed the instructions in the layers folder. However, I still get the error. :
root@6e57005559fd:/app/RSNet# whereis cuda cuda: /usr/local/cuda
root@6e57005559fd:/app/RSNet# python train.py Traceback (most recent call last): File "train.py", line 76, in <module> from net import RSNet File "/app/RSNet/net.py", line 7, in <module> from layers.slice_pool_layer.slice_pool_layer import * File "/app/RSNet/layers/slice_pool_layer/slice_pool_layer.py", line 3, in <module> from _ext import slice_pool_layer ModuleNotFoundError: No module named '_ext'
root@6e57005559fd:/usr/local# ls bin cuda cuda-10.0 etc games include lib man sbin share src root@6e57005559fd:/usr/local# cd cuda-10.0/ root@6e57005559fd:/usr/local/cuda-10.0# ls LICENSE README bin compat doc extras include lib64 nvml nvvm share src targets version.txt root@6e57005559fd:/usr/local/cuda-10.0# cd targets/ root@6e57005559fd:/usr/local/cuda-10.0/targets# ls x86_64-linux root@6e57005559fd:/usr/local/cuda-10.0/targets# cd x86_64-linux/ root@6e57005559fd:/usr/local/cuda-10.0/targets/x86_64-linux# ls include lib root@6e57005559fd:/usr/local/cuda-10.0/targets/x86_64-linux# cd include/ root@6e57005559fd:/usr/local/cuda-10.0/targets/x86_64-linux/include# $CPATH=/usr/local/cuda-10.0/targets/x86_64-linux/include bash: /usr/usc/cuda/10.0/include/=/usr/local/cuda-10.0/targets/x86_64-linux/include: No such file or directory root@6e57005559fd:/usr/local/cuda-10.0/targets/x86_64-linux/include# CPATH=/usr/local/cuda-10.0/targets/x86_64-linux/include root@6e57005559fd:/usr/local/cuda-10.0/targets/x86_64-linux/include# cd /app/RSNet/ root@6e57005559fd:/app/RSNet# cdc layers/slice_pool_layer/src/cuda/ bash: cdc: command not found root@6e57005559fd:/app/RSNet# cd layers/slice_pool_layer/src/cuda/ root@6e57005559fd:/app/RSNet/layers/slice_pool_layer/src/cuda# nvcc -c -o slice_pool_layer_cuda_kernel.cu.o slice_pool_layer_cuda_kernel.cu -x cu -Xcompiler -fPIC -arch=sm_61 root@6e57005559fd:/app/RSNet/layers/slice_pool_layer/src/cuda# cd ../../ root@6e57005559fd:/app/RSNet/layers/slice_pool_layer# python build.py build /app/RSNet/layers/slice_pool_layer Build with GPU mode. running build running build_ext root@6e57005559fd:/app/RSNet/layers/slice_pool_layer# cd ../slice_unpool_layer/s slice_unpool_layer.py src/ root@6e57005559fd:/app/RSNet/layers/slice_pool_layer# cd ../slice_unpool_layer/s slice_unpool_layer.py src/ root@6e57005559fd:/app/RSNet/layers/slice_pool_layer# cd ../slice_unpool_layer/src/cuda/ root@6e57005559fd:/app/RSNet/layers/slice_unpool_layer/src/cuda# nvcc -c -o slice_unpool_layer_cuda_kernel.cu.o slice_unpool_layer_cuda_kernel.cu -x cu -Xcompiler -fPIC -arch=sm_61 root@6e57005559fd:/app/RSNet/layers/slice_unpool_layer/src/cuda# cd ../../ root@6e57005559fd:/app/RSNet/layers/slice_unpool_layer# py pyclean pydoc pydoc3 pygettext pygmentize python2 python3 python3.6 python3.6m pyvenv pyversions pycompile pydoc2.7 pydoc3.6 pygettext2.7 python python2.7 python3-config python3.6-config python3.6m-config pyvenv-3.6 root@6e57005559fd:/app/RSNet/layers/slice_unpool_layer# python build.py build /app/RSNet/layers/slice_unpool_layer Build with GPU mode. running build running build_ext root@6e57005559fd:/app/RSNet/layers/slice_unpool_layer# ls
from rsnet.
from rsnet.
I'm not sure if it is the best way to go but I think I've solved the problem.
First of all, you need to define the CPATH properly. In my case it is CPATH=/usr/local/cuda/include
You can check it by the whereis cuda
command.
Secondly, You need to be careful about the computing capabilities of your graphic card. Otherwise, you will see Cuda-related errors when you run the train.py file. Such as this one ==> cudaCheckError() failed : no kernel image is available for execution on the device
. I attach a website that includes the numbers for the Nvidia GPUs. In my case, it was 52, because I was using GTX 970m mobile GPU.
RSNet/layers/slice_pool_layer/src/cuda
nvcc -c -o slice_pool_layer_cuda_kernel.cu.o slice_pool_layer_cuda_kernel.cu -x cu -Xcompiler -fPIC -arch=sm_52
RSNet/layers/slice_unpool_layer/src/cuda
nvcc -c -o slice_unpool_layer_cuda_kernel.cu.o slice_unpool_layer_cuda_kernel.cu -x cu -Xcompiler -fPIC -arch=sm_52
Then, we need to run the build.py file in both RSNet/layers/slice_pool_layer/
and RSNet/layers/slice_unpool_layer/
directories by running python build.py build
command. It will create a build folder including lib.linux-x86_64-3.6 that involves _ext folder.
I copied the _ext folders to directly RSNet/layers/slice_pool_layer/
RSNet/layers/slice_unpool_layer/
directories. So whenever slice_unpool_layer.py or slice_pool_layer.py looks for its _ext file we can import the _ext with a small update in both codes.
So I updated from _ext import slice_pool_layer
line as from ._ext import slice_pool_layer
(I did the same for the unpool one too.). I added .
to represent the directory that we run the code (RSNet/layers/slice_pool_layer/ or RSNet/layers/slice_unpool_layer/)
And, voila! now you can get yourno module named CV2
error in peace
I hope it helps someone.
from rsnet.
I can't open 'link.exe' file, can you send me your files have compiled files? My email is: [email protected] thank you very much
from rsnet.
from rsnet.
您好,我编译文件失败了,出现很多无法解析的符号,能否发一份您已经编译好的文件?我的邮箱:[email protected],万分感谢!
from rsnet.
from rsnet.
Related Issues (16)
- Quesion about Blocks HOT 1
- some issues
- Question about Scannet
- RuntimeError: cuda runtime error (77) : an illegal memory access was encountered at /pytorch/torch/lib/THC/generic/THCTensorCopy.c:20 HOT 2
- can you send me your files have compiled files?
- TypeError: dist must be a Distribution instance
- Error of -- indoor3d_sem_seg_hdf5_data_Area_5_1.0m_0.5s_train -- HOT 2
- Could this code run on cuda90?
- Testing results don't match the original room data. HOT 7
- ImportError: No module named _ext HOT 1
- How to get visualization results HOT 6
- Compatibility with Pytorch 0.4 HOT 2
- Question about Scannet dataset HOT 1
- ValueError: Wrong number of columns at line 180389
- Some error occur when doing the forward process
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rsnet.