使用caffenet微調時的一些總結

來源:互聯網
上載者:User

標籤:file   檔案   script   比較   access   映像   被鎖   cat   model   

1,比較笨的方法產生圖片列表(兩類舉例)
data/myself/train 目錄下

find -name cat.\*.jpg |cut -d ‘/‘ -f2-3 >train.txt
sed -i ‘s/$/ 0/g‘ train.txt
find -name dog.\*.jpg |cut -d ‘/‘ -f2-3 >tmp.txt
sed -i ‘s/$/ 1/g‘ tmp.txt
cat tmp.txt >>train.txt

將train.txt剪下到data/myself 下




2,刪除被鎖定檔案
刪除檔案夾執行個體:
sudo rm -rf /var/log/httpd/access
將會刪除/var/log/httpd/access目錄以及其下所有檔案、檔案夾

刪除檔案使用執行個體:
sudo rm -f /var/log/httpd/access.log
將會強制移除/var/log/httpd/access.log這個檔案



3,下載caffe zoo中的模型

cd caffe-master

python ./scripts/download_model_binary.py ./models/bvlc_reference_caffenet/
.py檔案是下載的命令。
後面是模型下載下來的路徑。



4,許可權問題,運行shell指令碼時:
permission denied

sudo chmod -R 777 目錄
其中 -R 是指級聯應用到目錄裡的所有子目錄和檔案
    777 是所有使用者都擁有最高許可權
sudo chmod +x *.sh

5,微調訓練模型指令:
 ./build/tools/caffe train --solver ./models/bvlc_reference_caffenet/solver.prototxt --weights ./models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel

6,映像尺寸改變指令碼

#!/usr/bin/env sh

for file in `ls`
do convert $file -resize 100x100! new_$file   ##!表示不考慮比例
done 

使用caffenet微調時的一些總結

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.