DIGITS使用步骤
1 切換到你的digits目錄下
2 ./digits-devserver 啟動digits
3 在瀏覽器上輸入 http://0.0.0.0.5000/ (將其作為一個服務(wù)器)
4 制作數(shù)據(jù)庫,制作模型
?
?
自己在用vgg模型時遇到的問題
??需要自定義網(wǎng)絡(luò)(將train_val.prototxt進(jìn)行修改)再下載一個預(yù)訓(xùn)練模型。
下面是網(wǎng)上搜到的修改prototxt的方法
1.去掉Data層中的transform_param中的mean_file和backend,會自動讀取之前數(shù)據(jù)集里生成的,mirror和crop_size不受影響,需要就填,不需要就不填
2.改 ?include {
????phase: TRAIN
??}
為 include { stage: "train" } ,同理TEST改成val,其實這個不改好像也可以,具體可以查看自定義網(wǎng)絡(luò)旁邊的問號幫助
3.修改最后一個全連接層的numoutput(這個其實不算吧,具體根據(jù)自己的填,只是提醒下別忘了)
4.最后一個全連接層后的網(wǎng)絡(luò)替換為(ip2為最后一個全連接層),其實就是把之前的網(wǎng)絡(luò)里的train_val和deploy給合并了
layer {
??name: "accuracy"
??type: "Accuracy"
??bottom: "ip2"
??bottom: "label"
??top: "accuracy"
??include { stage: "val" }
}
layer {
??name: "loss"
??type: "SoftmaxWithLoss"
??bottom: "ip2"
??bottom: "label"
??top: "loss"
??exclude { stage: "deploy" }
}
layer {
??name: "softmax"
??type: "Softmax"
??bottom: "ip2"
??top: "softmax"
??include { stage: "deploy" }
?
}
還需要預(yù)訓(xùn)練模型(/newdisk/VGG_ILSVRC_16_layers.caffemodel ?在網(wǎng)上下載的VGG16模型)
出現(xiàn)錯誤:ERROR:Cannot copy param 0 weights from layer 'fc8'; shape mismatch.Source param shape is 1 1 1000 4096 (4096000);target param shape is 2 4096(8192).To learn this layer's ....) ??num_output 最后一層自己做了修改,將1000換成了2 造成模型出現(xiàn)問題,num_output是需要計算的,以后要弄清楚原理!!!
?
?
總結(jié)
以上是生活随笔為你收集整理的DIGITS使用步骤的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ubuntu16.04 安装caffe以
- 下一篇: android闹钟唤醒不准的原因_俄罗斯