Open aoreskovic opened 6 years ago
try ./make.sh
, and run the training.
and if you use Pytorch 0.4.0, it will be very slow, because the usage of .data
.
for more details, you can read PyTorch 0.4.0 release notes.
When I run the training, I also meet the problem above. I try ./make.sh. But I such a problem.
on Ubuntu 16.04, (Python 3.5, Pytorch 0.4.1, gcc 5.4, CUDA 9.0)
_binop.c:28:20: fatal error: Python.h: No such file or directory
compilation terminated.
Traceback (most recent call last):
File "/usr/lib/python3.5/distutils/unixccompiler.py", line 118, in _compile
extra_postargs)
File "/usr/lib/python3.5/distutils/ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/usr/lib/python3.5/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/usr/lib/python3.5/distutils/spawn.py", line 159, in _spawn_posix
% (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'x86_64-linux-gnu-gcc' failed with exit status 1
I solved the problem that I used Pytorch 0.4.0 version. But I met a new problem.
Traceback (most recent call last):
File "main.py", line 19, in <module>
import binop
File "../binop/__init__.py", line 3, in <module>
from ._binop import lib as _lib, ffi as _ffi
ImportError: dynamic module does not define module export function (PyInit__binop)
How to figure it out?
here are the extensions for C++, cuda and numpy, maybe it'll work:https://github.com/pminhtam/xnor_conv_pytorch_extension
No matter what i try, I can run the training. I have tried compiling binop, and it compiles fine, but running doenst work:
on Ubuntu LTS 18.04: (Python 3.6, Pytorch 4.0, no GPU)
on Win10: (Python 3.6, Pytorch 4.0, no GPU)
It looks like there should be some module named binop.py that acts like a wrapper for _binop, but that isnt generated?