Skip to content

Commit

Permalink
Merge pull request BVLC#13 from BVLC/master
Browse files Browse the repository at this point in the history
update from upstream.
  • Loading branch information
bittnt committed May 31, 2016
2 parents db5c7d0 + 6f15463 commit 41f5825
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/caffe/layers/image_data_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ void ImageDataLayer<Dtype>::DataLayerSetUp(const vector<Blob<Dtype>*>& bottom,
lines_.push_back(std::make_pair(line.substr(0, pos), label));
}

CHECK(!lines_.empty()) << "File is empty";

if (this->layer_param_.image_data_param().shuffle()) {
// randomly shuffle data
LOG(INFO) << "Shuffling data";
Expand Down
2 changes: 1 addition & 1 deletion src/caffe/layers/memory_data_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ void MemoryDataLayer<Dtype>::set_batch_size(int new_size) {
template <typename Dtype>
void MemoryDataLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top) {
CHECK(data_) << "MemoryDataLayer needs to be initalized by calling Reset";
CHECK(data_) << "MemoryDataLayer needs to be initialized by calling Reset";
top[0]->Reshape(batch_size_, channels_, height_, width_);
top[1]->Reshape(batch_size_, 1, 1, 1);
top[0]->set_cpu_data(data_ + pos_ * size_);
Expand Down

0 comments on commit 41f5825

Please sign in to comment.