git選擇源代碼版本

源代碼在安裝pytorch舊版本時候,要用git選擇舊版本的
ssudo git clone --recursive https://github.com/pytorch/pytorch
#這個命令會下載全部的版本源代碼,有辦法只下載指定版本,可是我沒有試過
cd pytorch #進入到pytorch目錄。該目錄下有.git目錄
git tag #顯示各個版本
sudo git checkout v0.4.1 #選擇版本
sudo git submodule update --init --recursive # 下載並更新第三方庫,咱們要保證須要的第三方庫都下載完畢,否則在編譯過程當中會中斷。git

相關文章
相關標籤/搜索