fix post-rebase param bugs
authorJeff Donahue <jeff.donahue@gmail.com>
Mon, 17 Mar 2014 18:35:01 +0000 (11:35 -0700)
committerJeff Donahue <jeff.donahue@gmail.com>
Fri, 28 Mar 2014 06:42:28 +0000 (23:42 -0700)
src/caffe/layers/hdf5_data_layer.cpp
src/caffe/layers/hdf5_data_layer.cu
src/caffe/test/test_protobuf.cpp

index dc99688..035eea8 100644 (file)
@@ -97,21 +97,17 @@ Dtype HDF5DataLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom,
     if (current_row_ == data_blob_.num()) {
       if (num_files_ > 1) {
         current_file_ += 1;
-
         if (current_file_ == num_files_) {
           current_file_ = 0;
           LOG(INFO) << "looping around to first file";
         }
-
         load_hdf5_file_data(hdf_filenames_[current_file_].c_str());
       }
       current_row_ = 0;
     }
-
     memcpy(&(*top)[0]->mutable_cpu_data()[i * data_count],
            &data_blob_.cpu_data()[current_row_ * data_count],
            sizeof(Dtype) * data_count);
-
     memcpy(&(*top)[1]->mutable_cpu_data()[i * label_data_count],
             &label_blob_.cpu_data()[current_row_ * label_data_count],
             sizeof(Dtype) * label_data_count);
index 4a0733a..e8d09c0 100644 (file)
@@ -40,13 +40,11 @@ Dtype HDF5DataLayer<Dtype>::Forward_gpu(const vector<Blob<Dtype>*>& bottom,
       }
       current_row_ = 0;
     }
-
     CUDA_CHECK(cudaMemcpy(
             &(*top)[0]->mutable_gpu_data()[i * data_count],
             &data_blob_.cpu_data()[current_row_ * data_count],
             sizeof(Dtype) * data_count,
             cudaMemcpyHostToDevice));
-
     CUDA_CHECK(cudaMemcpy(
             &(*top)[1]->mutable_gpu_data()[i * label_data_count],
             &label_blob_.cpu_data()[current_row_ * label_data_count],
index 0618d8c..2db2fed 100644 (file)
@@ -16,7 +16,7 @@ class ProtoTest : public ::testing::Test {};
 TEST_F(ProtoTest, TestSerialization) {
   LayerParameter param;
   param.set_name("test");
-  param.set_type("dummy");
+  param.set_type(LayerParameter_LayerType_SPLIT);
   std::cout << "Printing in binary format." << std::endl;
   std::cout << param.SerializeAsString() << std::endl;
   std::cout << "Printing in text format." << std::endl;