LArbys / LArCV

Liquid Argon Computer Vision
11 stars 9 forks source link

LArbys/caffe UseThread: false doesn't fill #64

Closed vgenty closed 7 years ago

vgenty commented 7 years ago

Line 56 here

https://github.com/LArbys/caffe/blob/ub_develop/src/caffe/layers/root_data_layer.cpp#L56

of root_data_layer.cpp checks filler.thread_config()

   if(filler.thread_config())                                                                                                                                    
         filler.batch_process(batch_size);

But I don't want to use threads. So I get stuck on the first batch forever. If I comment out the conditional statement then works OK.

https://github.com/LArbys/caffe/commit/1436e1a3df77709e2c38012638b1237d62963dfc

drinkingkazu commented 7 years ago

I think there's a logic flaw in your fix.

This line: https://github.com/LArbys/caffe/blob/ub_develop/src/caffe/layers/root_data_layer.cpp#L56 is supposed to start thread while caffe is using loaded data for threaded mode. On the other hand this line: https://github.com/LArbys/caffe/blob/ub_develop/src/caffe/layers/root_data_layer.cpp#L38 is supposed to load data for none-threaded-mode, so this line is a bug.

Your implementation (or current implementation with line 38 bug) will run IO twice for threaded mode, which is a bug. So I suggest we put back line 58, and modify line 38. I hope that fix things and not just patch to make what you want work. Does that make sense?

Kazu

vgenty commented 7 years ago

Updated ub_develop branch with latest pull of BLVC caffe, and include this fix @

https://github.com/LArbys/caffe/commit/e29eb428df9f9b8ce248c98f7c27835f5b01b039