2017-08-07 19 views
1

我試着去培養一個朱古力Model.I得到這個錯誤裁剪大小錯誤朱古力型號

I0806 09:41:02.010442 2992 sgd_solver.cpp:105] Iteration 360, lr = 9.76e- 05 
F0806 09:41:20.544955 2998 
data_transformer.cpp:168] Check failed: height<=datum_height (224 vs. 199) 
*** Check failure stack trace: *** 
    @  0x7f82b051edaa (unknown) 
    @  0x7f82b051ece4 (unknown) 
    @  0x7f82b051e6e6 (unknown) 
    @  0x7f82b0521687 (unknown) 
    @  0x7f82b0b8e9e0 caffe::DataTransformer<>::Transform() 
    @  0x7f82b0c09a2f caffe::DataLayer<>::load_batch() 
    @  0x7f82b0c9aa5 
caffe::BasePrefetchingDataLayer<>::InternalThreadEntry() 
    @  0x7f82b0b6ea30 caffe::InternalThread::entry() 
    @  0x7f82b0b6f376 boost::detail::thread_data<>::run() 
    @  0x7f82a6afea4a (unknown) 
    @  0x7f82a1147184 start_thread 
    @  0x7f82aee51ffd (unknown) 
    @    (nil) (unknown) 
Aborted (core dumped) 

我得到了類似的錯誤,但Check failed: height<=datum_height (227 vs. 224)。我再改爲227至224,但現在我得到這個。有什麼建議麼?

編輯:我對LMDB-

EXAMPLE=/home/hyperworks/colorfile/ # Path where the output LMDB is stored 
DATA=/home/hyperworks/colorfile/  # Path where the data.txt file is present 
TOOLS=/home/hyperworks/caffe/build/tools/ # Caffe dependency to access the convert_imageset utility 
DATA_ROOT=/home/hyperworks/colorfile/train/ # Path prefix for each entry in data.txt 
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 

# ---------------------------- 

RESIZE=true 
if $RESIZE; then 
    RESIZE_HEIGHT=227 
    RESIZE_WIDTH=227 
else 
    RESIZE_HEIGHT=0 
    RESIZE_WIDTH=0 
fi 

# Checks for DATA_ROOT Path 
if [ ! -d "$DATA_ROOT" ]; then 
    echo "Error: DATA_ROOT is not a path to a directory: $DATA_ROOT" 
    echo "Set the DATA_ROOT variable to the path where the data 
    instances are stored." 
    exit 1 
fi 

# ------------------------------ 
# Creating LMDB 
echo "Creating data lmdb..." 
GLOG_logtostderr=1 $TOOLS/convert_imageset \ 
    $DATA_ROOT \ 
    $DATA/train.txt \ 
    $EXAMPLE/train_lmdb 

# ------------------------------ 
echo "Done." 

此代碼是我用來創建LMDB文件 - 這是我用來創建LMDB代碼文件 -

+0

我認爲這個值應該低於199,比如「190」。 –

回答

2

好像代碼在輸入數據集酮(?或多個)圖像具有高度199 height = 199.來自Caffe不能裁剪圖像大小224

錯誤消息說明:

data_transformer.cpp:168] Check failed: height<=datum_height (224 vs. 199) 

綜觀'data_transformer.cpp' line 168

CHECK_LE(height, datum_height); 

的數據變換器檢查該作物高度(height)是小於或等於(LE)連接到輸入datum_height
正如您從錯誤消息中可以看到的,此檢查失敗,這意味着輸入高度大於裁切高度。條件height=224 <= datum_height=199不成立並引發錯誤。

+0

我使用調整大小操作,同時使lmdb文件將其調整爲227 * 227,但即時通訊仍然收到相同的錯誤。我應該更改或編輯什麼? – Ryan

+0

@Ryan顯然調整大小沒有按預期工作。你可以顯示你用來創建lmdb的代碼嗎?你確定你使用的是正確的LMDB嗎? – Shai

+0

lmdb代碼張貼在 – Ryan