зеркало из https://github.com/microsoft/caffe.git
Rebase and change the HDF5OutputLayer::Forward/Backward signatures
This commit is contained in:
Родитель
dd9e05bff4
Коммит
2b28b2090d
|
@ -490,13 +490,13 @@ class HDF5OutputLayer : public Layer<Dtype> {
|
|||
inline std::string file_name() const { return file_name_; }
|
||||
|
||||
protected:
|
||||
virtual void Forward_cpu(const vector<Blob<Dtype>*>& bottom,
|
||||
virtual Dtype Forward_cpu(const vector<Blob<Dtype>*>& bottom,
|
||||
vector<Blob<Dtype>*>* top);
|
||||
virtual void Forward_gpu(const vector<Blob<Dtype>*>& bottom,
|
||||
virtual Dtype Forward_gpu(const vector<Blob<Dtype>*>& bottom,
|
||||
vector<Blob<Dtype>*>* top);
|
||||
virtual Dtype Backward_cpu(const vector<Blob<Dtype>*>& top,
|
||||
virtual void Backward_cpu(const vector<Blob<Dtype>*>& top,
|
||||
const bool propagate_down, vector<Blob<Dtype>*>* bottom);
|
||||
virtual Dtype Backward_gpu(const vector<Blob<Dtype>*>& top,
|
||||
virtual void Backward_gpu(const vector<Blob<Dtype>*>& top,
|
||||
const bool propagate_down, vector<Blob<Dtype>*>* bottom);
|
||||
virtual void SaveBlobs();
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ void HDF5OutputLayer<Dtype>::SetUp(const vector<Blob<Dtype>*>& bottom,
|
|||
}
|
||||
|
||||
template <typename Dtype>
|
||||
void HDF5OutputLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom,
|
||||
Dtype HDF5OutputLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom,
|
||||
vector<Blob<Dtype>*>* top) {
|
||||
CHECK_GE(bottom.size(), 2);
|
||||
CHECK_EQ(bottom[0]->num(), bottom[1]->num());
|
||||
|
@ -74,10 +74,11 @@ void HDF5OutputLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom,
|
|||
sizeof(Dtype) * label_datum_dim);
|
||||
}
|
||||
SaveBlobs();
|
||||
return Dtype(0.);
|
||||
}
|
||||
|
||||
template <typename Dtype>
|
||||
void HDF5OutputLayer<Dtype>::Forward_gpu(const vector<Blob<Dtype>*>& bottom,
|
||||
Dtype HDF5OutputLayer<Dtype>::Forward_gpu(const vector<Blob<Dtype>*>& bottom,
|
||||
vector<Blob<Dtype>*>* top) {
|
||||
CHECK_GE(bottom.size(), 2);
|
||||
CHECK_EQ(bottom[0]->num(), bottom[1]->num());
|
||||
|
@ -97,18 +98,19 @@ void HDF5OutputLayer<Dtype>::Forward_gpu(const vector<Blob<Dtype>*>& bottom,
|
|||
sizeof(Dtype) * label_datum_dim, cudaMemcpyDeviceToHost));
|
||||
}
|
||||
SaveBlobs();
|
||||
}
|
||||
|
||||
template <typename Dtype>
|
||||
Dtype HDF5OutputLayer<Dtype>::Backward_cpu(const vector<Blob<Dtype>*>& top,
|
||||
const bool propagate_down, vector<Blob<Dtype>*>* bottom) {
|
||||
return Dtype(0.);
|
||||
}
|
||||
|
||||
template <typename Dtype>
|
||||
Dtype HDF5OutputLayer<Dtype>::Backward_gpu(const vector<Blob<Dtype>*>& top,
|
||||
void HDF5OutputLayer<Dtype>::Backward_cpu(const vector<Blob<Dtype>*>& top,
|
||||
const bool propagate_down, vector<Blob<Dtype>*>* bottom) {
|
||||
return Dtype(0.);
|
||||
return;
|
||||
}
|
||||
|
||||
template <typename Dtype>
|
||||
void HDF5OutputLayer<Dtype>::Backward_gpu(const vector<Blob<Dtype>*>& top,
|
||||
const bool propagate_down, vector<Blob<Dtype>*>* bottom) {
|
||||
return;
|
||||
}
|
||||
|
||||
INSTANTIATE_CLASS(HDF5OutputLayer);
|
||||
|
|
Загрузка…
Ссылка в новой задаче