2016-09-15 67 views
3

我試圖在segNet(caffe)上訓練我自己的數據集,我準備了與segnet tutorial相同的數據集。當我嘗試運行的火車,它表明我這個錯誤:SegNet - CUBLAS_STATUS_SUCCESS(11 vs. 0)CUBLAS_STATUS_MAPPING_ERROR

I0915 08:33:50.851986 49060 net.cpp:482] Collecting Learning Rate and Weight Decay. 
I0915 08:33:50.852017 49060 net.cpp:247] Network initialization done. 
I0915 08:33:50.852030 49060 net.cpp:248] Memory required for data: 1064448016 
I0915 08:33:50.852730 49060 solver.cpp:42] Solver scaffolding done. 
I0915 08:33:50.853065 49060 solver.cpp:250] Solving VGG_ILSVRC_16_layer 
I0915 08:33:50.853080 49060 solver.cpp:251] Learning Rate Policy: step 
F0915 08:33:51.324506 49060 math_functions.cu:123] Check failed: status == CUBLAS_STATUS_SUCCESS (11 vs. 0) CUBLAS_STATUS_MAPPING_ERROR 
*** Check failure stack trace: *** 
    @  0x7fa27a0d3daa (unknown) 
    @  0x7fa27a0d3ce4 (unknown) 
    @  0x7fa27a0d36e6 (unknown) 
    @  0x7fa27a0d6687 (unknown) 
    @  0x7fa27a56946e caffe::caffe_gpu_asum<>() 
    @  0x7fa27a54b264 caffe::SoftmaxWithLossLayer<>::Forward_gpu() 
    @  0x7fa27a440b29 caffe::Net<>::ForwardFromTo() 
    @  0x7fa27a440f57 caffe::Net<>::ForwardPrefilled() 
    @  0x7fa27a436745 caffe::Solver<>::Step() 
    @  0x7fa27a43707f caffe::Solver<>::Solve() 
    @   0x406676 train() 
    @   0x404bb1 main 
    @  0x7fa2795e5f45 (unknown) 
    @   0x40515d (unknown) 
    @    (nil) (unknown) 

我的數據集是.jpg(火車).png(標籤灰度圖像)和.txt文件教程。可能是什麼問題?謝謝你的幫助

+0

當我改變了: 'loss_param:{ weight_by_label_freqs:真 ignore_label:2 class_weighting:99 class_weighting:1 }'的'損失layer'問題改爲:'math_functions.cu:123]檢查失敗:狀態== CUBLAS_STATUS_SUCCESS(13與0)CUBLAS_STATUS_EXECUTION_FAILED' ' –

+0

我解決了它。問題在於我的GT圖像是用alpha圖層的。那是錯的。代碼行示例:'img = Image.open(filename).convert('L')'(and not(LA)) –

+0

嗨,我有同樣的問題。你能給出正確的答案嗎?而不是在評論中回答你的問題? – thigi

回答

1

地面實況圖像應該是1通道0-255沒有alpha層的圖像,所以NN會識別這些類之間的差異。

img = Image.open(filename).convert('L') # Not 'LA' (A - alpha) 
0

感謝isn4,這裏是分辨率: 原來你必須改變的像素值的範圍,以及像素值的實際數量。如果您有256個可能的像素值(0-255),並且每個像素值沒有類別權重,Segnet會感到困惑。因此,我將所有的PNG標籤圖像從255和0更改爲像素可能性1和0作爲像素可能性。 這裏是我這樣做的Python腳本:

import os 
import cv2 
import numpy as np 
img = cv2.imread('/usr/local/project/old_png_labels/label.png, 0) 
a_img = np.array(img, np.double) 
normalized = cv2.normalize(img, a_img, 1.0, 0.0, cv2.NORM_MINMAX) 
cv2.imwrite('/usr/local//project/png_labels/label.png, normalized)