| 10 | |
| 11 | template <typename Dtype> |
| 12 | void HDF5OutputLayer<Dtype>::LayerSetUp(const vector<Blob<Dtype>*>& bottom, |
| 13 | const vector<Blob<Dtype>*>& top) { |
| 14 | file_name_ = this->layer_param_.hdf5_output_param().file_name(); |
| 15 | file_id_ = H5Fcreate(file_name_.c_str(), H5F_ACC_TRUNC, H5P_DEFAULT, |
| 16 | H5P_DEFAULT); |
| 17 | CHECK_GE(file_id_, 0) << "Failed to open HDF5 file" << file_name_; |
| 18 | file_opened_ = true; |
| 19 | } |
| 20 | |
| 21 | template <typename Dtype> |
| 22 | HDF5OutputLayer<Dtype>::~HDF5OutputLayer<Dtype>() { |