pytorch训练剪枝版yoloV3遇见的几个坑

pytorch框架下的剪枝版本yoloV3下载地址

坑一:首先配置环境,参照主目录下的requirements.txt

# pip3 install -U -r requirements.txt
numpy
opencv-python
torch >= 1.2
matplotlib
pycocotools
tqdm
tb-nightly
future
Pillow

# Equivalent conda commands ----------------------------------------------------
# conda update -n base -c defaults conda
# conda install -yc anaconda future numpy opencv matplotlib tqdm pillow
# conda install -yc conda-forge scikit-image tensorboard pycocotools
# conda install -yc spyder-ide spyder-line-profiler
# conda install -yc pytorch pytorch torchvision

我这里是用的Anaconda环境,所以采用的第二种方法,但是由于pytorch官方的conda源对于网络不好的地方经常断掉,所以需要更换国内的conda源,搜过好多介绍这方面的,但pytorch下载依然很慢,由于国内的博客写的也是乱七八糟,pytorch正确的国内conda源(清华源)添加正确方式如下:

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/

然后再运行上面的步骤就会很快安装成功了。

坑二:

运行训练程序:

python3 train.py --data data/oxfordhand.data --batch-size 32 --accumulate 1 --weights weights/yolov3.weights --cfg cfg/yolov3-hand.cfg

训练自己的数据时报错:

  • 0
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值