dec icon indicating copy to clipboard operation
dec copied to clipboard

leveldb iterator is invalid

Open yalesong opened this issue 9 years ago • 5 comments

Running an experiment with reutersidf10k dataset via python dec.py reutersidf10k fails with an error

I0721 18:03:54.192920 24690 net.cpp:67] Creating Layer data
I0721 18:03:54.192975 24690 net.cpp:358] data -> data
I0721 18:03:54.193002 24690 net.cpp:96] Setting up data
I0721 18:03:54.193032 24690 data_layer.cpp:45] Opening leveldb reutersidf10k_total
python: db_iter.cc:68: virtual leveldb::Slice leveldb::<unnamed>::DBIter::value() const: Assertion `valid_' failed.

The same error occurs with the mnist and the reutersidf datasets. I haven't tried with the stl dataset.

I compiled the Caffe library provided in this repo, downloaded the dataset, and ran python make_reuters_data.py as given in the instruction.

The error happens when iter_->value() is called in: https://github.com/piiswrong/dec/blob/master/caffe/src/caffe/layers/data_layer.cpp#L122

It seems https://github.com/piiswrong/dec/blob/master/caffe/src/caffe/layers/data_layer.cpp#L53 creates an invalid iterator; putting a line CHECK(iter->Valid()) immediately after it fails.

My leveldb version is 1.0.7

yalesong avatar Jul 21 '16 18:07 yalesong

@yalesong did you solve this problem? I am being bewildered with it.

lipond avatar Sep 25 '16 13:09 lipond

@lipond No I haven't. Are you getting the same problem?

yalesong avatar Sep 26 '16 14:09 yalesong

When python dec.py mnist, do you have the error : AttributeError: type object 'Net' has no attribute 'set_phase_train'

hkrds1996 avatar Nov 03 '16 06:11 hkrds1996

@hukangrong It appears that you are importing the official, public version of the CAFFE library. This repo contains a modified version of CAFFE and you would have to compile & import that one instead.

yalesong avatar Nov 03 '16 14:11 yalesong

@yalesong Thank you for your reply. Compiling it need much time. I would change the author code rather than build it again.

hkrds1996 avatar Nov 04 '16 00:11 hkrds1996