2 #ifndef CAFFE_UTIL_HDF5_H_
3 #define CAFFE_UTIL_HDF5_H_
10 #include "caffe/blob.hpp"
14 template <
typename Dtype>
15 void hdf5_load_nd_dataset_helper(
16 hid_t file_id,
const char* dataset_name_,
int min_dim,
int max_dim,
17 Blob<Dtype>* blob,
bool reshape);
19 template <
typename Dtype>
20 void hdf5_load_nd_dataset(
21 hid_t file_id,
const char* dataset_name_,
int min_dim,
int max_dim,
22 Blob<Dtype>* blob,
bool reshape =
false);
24 template <
typename Dtype>
25 void hdf5_save_nd_dataset(
26 const hid_t file_id,
const string& dataset_name,
const Blob<Dtype>& blob,
27 bool write_diff =
false);
29 int hdf5_load_int(hid_t loc_id,
const string& dataset_name);
30 void hdf5_save_int(hid_t loc_id,
const string& dataset_name,
int i);
31 string hdf5_load_string(hid_t loc_id,
const string& dataset_name);
32 void hdf5_save_string(hid_t loc_id,
const string& dataset_name,
35 int hdf5_get_num_links(hid_t loc_id);
36 string hdf5_get_name_by_idx(hid_t loc_id,
int idx);
40 #endif // CAFFE_UTIL_HDF5_H_