SegNet训练数据集

参考:https://blog.csdn.net/menglanzeng/article/details/89284515

I1221 14:40:57.487751 15003 sgd_solver.cpp:106] Iteration 0, lr = 0.001
F1221 14:40:57.493633 15003 syncedmem.cpp:56] Check failed: error == cudaSuccess (2 vs. 0)  out of memory
*** Check failure stack trace: ***
    @     0x7f2f64ed0daa  (unknown)
    @     0x7f2f64ed0ce4  (unknown)
    @     0x7f2f64ed06e6  (unknown)
    @     0x7f2f64ed3687  (unknown)
    @     0x7f2f655da931  caffe::SyncedMemory::to_gpu()
    @     0x7f2f655d9c99  caffe::SyncedMemory::mutable_gpu_data()
    @     0x7f2f654d4462  caffe::Blob<>::mutable_gpu_data()
    @     0x7f2f6561e26c  caffe::SGDSolver<>::ComputeUpdateValue()
    @     0x7f2f6561ec63  caffe::SGDSolver<>::ApplyUpdate()
    @     0x7f2f654cf68c  caffe::Solver<>::Step()
    @     0x7f2f654cfe99  caffe::Solver<>::Solve()
    @           0x408b0b  train()
    @           0x405e6c  main
    @     0x7f2f6372bf45  (unknown)
    @           0x406773  (unknown)
    @              (nil)  (unknown)

解决方法:batch_size太大了,一次性读入的图片太多了,所以就超出了显存。因此需要将train.prototxt中的文件train和test的batch_size调小一点。这里调成了batch_size = 2.

1.train:
./caffe-segnet/build/tools/caffe train -solver ./Models/segnet_solver.prototxt

2.change the path of test.txt in segnet_inference.prototxt
sudo python ./Scripts/compute_bn_statistics.py ./Models/segnet_train.prototxt ./Models/Training/segnet_iter_40000.caffemodel ./Models/Inference/

sudo python ./Scripts/test_segmentation_camvid.py --model ./Models/segnet_inference.prototxt --weights ./Models/Inference/test_weights.caffemodel --iter 233

sudo python ./Scripts/test_segmentation_camvid.py --model ./Models/segnet_basic_inference.prototxt --weights ./Models/Inference/test_weights.caffemodel --iter 233

1.train:
./caffe-segnet/build/tools/caffe train -solver ./Models/segnet_solver.prototxt

2.change the path of test.txt in segnet_inference.prototxt
sudo python ./Scripts/compute_bn_statistics.py ./Models/segnet_train.prototxt ./Models/Training/segnet_iter_40000.caffemodel ./Models/Inference/

sudo python ./Scripts/test_segmentation_camvid.py --model ./Models/segnet_inference.prototxt --weights ./Models/Inference/test_weights.caffemodel --iter 233

sudo python ./Scripts/test_segmentation_camvid.py --model ./Models/segnet_basic_inference.prototxt --weights ./Models/Inference/test_weights.caffemodel --iter 233

 

./build/segmentation ../Example_Models/segnet_basic_camvid.prototxt ../segnet_basic_camvid.caffemodel ../000653.png ./pascal.png

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值