MCPcopy Create free account
hub / github.com/BVLC/caffe / Next

Method Next

src/caffe/layers/hdf5_data_layer.cpp:139–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137
138template<typename Dtype>
139void HDF5DataLayer<Dtype>::Next() {
140 if (++current_row_ == hdf_blobs_[0]->shape(0)) {
141 if (num_files_ > 1) {
142 ++current_file_;
143 if (current_file_ == num_files_) {
144 current_file_ = 0;
145 if (this->layer_param_.hdf5_data_param().shuffle()) {
146 std::random_shuffle(file_permutation_.begin(),
147 file_permutation_.end());
148 }
149 DLOG(INFO) << "Looping around to first file.";
150 }
151 LoadHDF5FileData(
152 hdf_filenames_[file_permutation_[current_file_]].c_str());
153 }
154 current_row_ = 0;
155 if (this->layer_param_.hdf5_data_param().shuffle())
156 std::random_shuffle(data_permutation_.begin(), data_permutation_.end());
157 }
158 offset_++;
159}
160
161template <typename Dtype>
162void HDF5DataLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom,

Callers

nothing calls this directly

Calls 3

shapeMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected