test error !
感谢您开源代码 但是test出问题了 能麻烦您给一个类似mnist的测试例子吗
sun@sunwin:~/0newcodedown/deformable-convolution-pytorch-master$ python test.py
Traceback (most recent call last):
File "test.py", line 6, in
Did you skip the compiling step?
sh make.sh
CC=g++ python build.py
非常感谢您的建议
sun@sunwin:~$ cd /home/sun/0newcodedown/deformable-convolution-pytorch-master
sun@sunwin:~/0newcodedown/deformable-convolution-pytorch-master$ CC=g++ python build.py
Including CUDA code.
/home/sun/0newcodedown/deformable-convolution-pytorch-master
generating /tmp/tmpRX3mGT/_deform_conv.c
setting the current directory to '/tmp/tmpRX3mGT'
running build_ext
building '_deform_conv' extension
creating home
creating home/sun
creating home/sun/0newcodedown
creating home/sun/0newcodedown/deformable-convolution-pytorch-master
creating home/sun/0newcodedown/deformable-convolution-pytorch-master/src
g++ -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DWITH_CUDA -I/usr/local/lib/python2.7/dist-packages/torch/utils/ffi/../../lib/include -I/usr/local/lib/python2.7/dist-packages/torch/utils/ffi/../../lib/include/TH -I/usr/local/lib/python2.7/dist-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/usr/include/python2.7 -c _deform_conv.c -o ./_deform_conv.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
g++ -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DWITH_CUDA -I/usr/local/lib/python2.7/dist-packages/torch/utils/ffi/../../lib/include -I/usr/local/lib/python2.7/dist-packages/torch/utils/ffi/../../lib/include/TH -I/usr/local/lib/python2.7/dist-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/usr/include/python2.7 -c /home/sun/0newcodedown/deformable-convolution-pytorch-master/src/deform_conv.c -o ./home/sun/0newcodedown/deformable-convolution-pytorch-master/src/deform_conv.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
g++ -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DWITH_CUDA -I/usr/local/lib/python2.7/dist-packages/torch/utils/ffi/../../lib/include -I/usr/local/lib/python2.7/dist-packages/torch/utils/ffi/../../lib/include/TH -I/usr/local/lib/python2.7/dist-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/usr/include/python2.7 -c /home/sun/0newcodedown/deformable-convolution-pytorch-master/src/deform_conv_cuda.c -o ./home/sun/0newcodedown/deformable-convolution-pytorch-master/src/deform_conv_cuda.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security ./_deform_conv.o ./home/sun/0newcodedown/deformable-convolution-pytorch-master/src/deform_conv.o ./home/sun/0newcodedown/deformable-convolution-pytorch-master/src/deform_conv_cuda.o /home/sun/0newcodedown/deformable-convolution-pytorch-master/src/deform_conv_cuda_kernel.cu.o -o ./_deform_conv.so
sun@sunwin:~/0newcodedown/deformable-convolution-pytorch-master$ python test.py
THCudaCheck FAIL file=/b/wheel/pytorch-src/torch/lib/THC/generic/THCStorage.cu line=66 error=2 : out of memory
Traceback (most recent call last):
File "test.py", line 20, in
这个测试用到的显存不超过500M,你得检查下显存占用
我关闭了tensorflow 看起来不出现错误啦 感谢\(^o^)/~ sun@sunwin:~/0newcodedown/deformable-convolution-pytorch-master$ python test.py (1L, 4L, 512L, 512L)