在使用YOLOv4 訓練時, 又發生數次卡關的結果, 記錄一次原因及解決方法. Create 6 permanent cpu-threads.
因為目錄有太多之前實驗的內容, 加上又要使用自己的training image, 目錄及檔案都是自己準備的. train-list.txt 也是自行上產生的. 過程就出現幾個錯誤. 一開始以為是環境問題.還好只是使用上的錯誤.
Training
darknet detector train a.data a.cfg yolov4.weight
Create 6 permanent cpu-threads.
什麼動作都沒做, 然後就跳開,
其實這個訊息不是錯誤
A. 改model, 改classes 數目後, 第一次training , 請記得 下 –clear 參數
darknet detector train a.data a.cfg -clear
不然會出現 Create 6 permanent cpu-threads. 就結束
B. darknet detector train a.data a.cfg yolo_last.weight
還是出現Create 6 permanent cpu-threads. 就結束
其實這個訊息也不是錯誤, 是以下二個原因造成的.
原因一: iteration 已經用完, 因為使用現成的weight 內容記錄著次數. 次數若已經跑完, 則程式直接結束.
解法: 將 .cfg file 中的 max_batches = 改到比原來大很多
解法二: batch=64 將batch 改大為64, (subdivisions 也同時改大), 例如2X可以再撐1倍時間. subdivisions=64
C. 原因二: train.txt 是空的, 檔案內無內容, empty file
解法: 給出對的training file list on train.txt
相關:
