Should the first blob be ignored? Is it?

22 views
Skip to first unread message

robosmith

unread,
Jun 3, 2016, 2:23:51 AM6/3/16
to Caffe Users
Looking at the code in DataLayer.cpp, I see 1 place where net input  Blobs are populated from a database value() read via a Datum: InternalThreadEntry(), which is called in the prefetch thread.
 
However, the first Datum is read by value() in DataLayerSetUp, but does not appear to populate a Blob for net input.

 

Because the first value() read advances the cursor, it appears the first value() call is not input to net at all.

 

Is this the case? Should the first value() read data be ignored like it appears is happening?

 

 

 

 

Message has been deleted

robosmith

unread,
Jun 4, 2016, 11:14:46 AM6/4/16
to Caffe Users
Upon closer examination, it appears that for LMDB/LevelDB cursor behavior, the value() read call does not advance the cursor to the next Blob for successive calls.
 
The cursor is only advanced to the next Blob read when cursor_->Next() is called (comments say next iter).
 
So successive calls to value() read the same Blob, and the initial Blob is not ignored, just duplicate read.
 
And every Blob is duplicate read when the batch size is 1.
Reply all
Reply to author
Forward
0 new messages