| 8 | |
| 9 | template <typename Dtype> |
| 10 | void SliceLayer<Dtype>::LayerSetUp(const vector<Blob<Dtype>*>& bottom, |
| 11 | const vector<Blob<Dtype>*>& top) { |
| 12 | const SliceParameter& slice_param = this->layer_param_.slice_param(); |
| 13 | CHECK(!(slice_param.has_axis() && slice_param.has_slice_dim())) |
| 14 | << "Either axis or slice_dim should be specified; not both."; |
| 15 | slice_point_.clear(); |
| 16 | std::copy(slice_param.slice_point().begin(), |
| 17 | slice_param.slice_point().end(), |
| 18 | std::back_inserter(slice_point_)); |
| 19 | } |
| 20 | |
| 21 | template <typename Dtype> |
| 22 | void SliceLayer<Dtype>::Reshape(const vector<Blob<Dtype>*>& bottom, |