git clone pytorch或caffe2速度慢的解决办法

caffe2官方代码,现在已经放在pytorch项目中了。

因此,源码编译pytorch或caffe2,都需要 https://github.com/pytorch/pytorch 下载代码。

由于pytorch和caffe2都依赖很多依赖项,它们通过git submodule形式管理,下载它们需要很长时间,不下载的话又不能源码编译。

一个办法是先找一个网好的地方git clone --recursive,后续拷贝整个repo,然后改origin远端官方地址,再git pull拉取最新。

  1. 找个网好的地方,git clone --recursive https://github.com/pytorch/pytorch
    或者直接用我下载好的 https://gitee.com/aczz/pytorch-zip
    也可以从网盘下载 链接: https://pan.baidu.com/s/1X13zj95Ro1N_zMOED5wpVQ 提取码: kqvu

cd pytorch
git remote set-url origin https://github.com/pytorch/pytorch
git pull
原文地址:https://www.cnblogs.com/zjutzz/p/10695413.html