yolo2-pytorch icon indicating copy to clipboard operation
yolo2-pytorch copied to clipboard

cpu only

Open qq1243196045 opened this issue 4 years ago • 1 comments

I want to use it with pytorch-cuponly ,what should I do? thanks!!

qq1243196045 avatar Jul 22 '21 02:07 qq1243196045

first create a conda virtual environment, where python version is 3.6 conda create -n pytorch_cpu python=3.6 then confirm it conda activate pytorch_cpu,python --version(it should be ) second,install torch and torchvision, note the version must be matched,in this project,torch version is 0.4.0(cpu),torchvision version is 0.2.0 pip install http://download.pytorch.org/whl/cpu/torch-0.4.0-cp36-cp36m-linux_x86_64.whl pip install torchvision==0.2.0 third, other packages should also be matched,whose version is earlier than now.the packages is numpy,cffi,cython,the version which i used is as follows: pip install cffi==1.8.2 -i https://mirror.baidu.com/pypi/simple pip install numpy==1.15.0 pip install cython==0.27.3 -i https://mirror.baidu.com/pypi/simple then,you can pass the first step 'sh make.sh',but the whole project is based on gpu,so cpu version can't work without any change.if you delete the cuda related code ,it may work

robator0127 avatar Apr 03 '23 08:04 robator0127