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);
}
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],
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;