Skip to content

Commit

Permalink
forgotten!
Browse files Browse the repository at this point in the history
  • Loading branch information
drinkingkazu committed Jul 28, 2016
1 parent 5cfe3f1 commit 0550386
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/caffe/layers/root_data_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ namespace caffe {
std::string name = this->layer_param_.root_data_param().filler_name();

//Instantiate ThreadDatumFiller only once
if(!(::larcv::ThreadFillerFactory::exist_filler(name))) {
auto& filler = ::larcv::ThreadFillerFactory::get_filler(name);
bool first_time = !(::larcv::ThreadFillerFactory::exist_filler(name));
auto& filler = ::larcv::ThreadFillerFactory::get_filler(name);
if(first_time) {
filler.configure(this->layer_param_.root_data_param().filler_config());
// Start read thread
filler.batch_process(batch_size);
}else if(filler.thread_config()){
auto& filler = ::larcv::ThreadFillerFactory::get_filler(name);
filler.batch_process(batch_size);
}
else if(filler.thread_config())
filler.batch_process(batch_size);

root_helper rh;
rh._filler_name = name;
Expand All @@ -53,10 +53,8 @@ namespace caffe {
root_load_data(rh, root_blobs_[0].get(), root_blobs_[1].get());

// Start read thread
if(filler.thread_config()) {
auto& filler = ::larcv::ThreadFillerFactory::get_filler(name);
if(filler.thread_config())
filler.batch_process(batch_size);
}

// MinTopBlobs==1 guarantees at least one top blob
CHECK_GE(root_blobs_[0]->num_axes(), 1) << "Input must have at least 1 axis.";
Expand Down

0 comments on commit 0550386

Please sign in to comment.