1 #ifndef CAFFE_CUDNN_TANH_LAYER_HPP_ 2 #define CAFFE_CUDNN_TANH_LAYER_HPP_ 6 #include "caffe/blob.hpp" 7 #include "caffe/layer.hpp" 8 #include "caffe/proto/caffe.pb.h" 10 #include "caffe/layers/neuron_layer.hpp" 11 #include "caffe/layers/tanh_layer.hpp" 19 template <
typename Dtype>
20 class CuDNNTanHLayer :
public TanHLayer<Dtype> {
22 explicit CuDNNTanHLayer(
const LayerParameter& param)
23 : TanHLayer<Dtype>(param), handles_setup_(false) {}
24 virtual void LayerSetUp(
const vector<Blob<Dtype>*>& bottom,
25 const vector<Blob<Dtype>*>& top);
26 virtual void Reshape(
const vector<Blob<Dtype>*>& bottom,
27 const vector<Blob<Dtype>*>& top);
28 virtual ~CuDNNTanHLayer();
31 virtual void Forward_gpu(
const vector<Blob<Dtype>*>& bottom,
32 const vector<Blob<Dtype>*>& top);
33 virtual void Backward_gpu(
const vector<Blob<Dtype>*>& top,
34 const vector<bool>& propagate_down,
const vector<Blob<Dtype>*>& bottom);
37 cudnnHandle_t handle_;
38 cudnnTensorDescriptor_t bottom_desc_;
39 cudnnTensorDescriptor_t top_desc_;
40 cudnnActivationDescriptor_t activ_desc_;
46 #endif // CAFFE_CUDNN_TANH_LAYER_HPP_ A layer factory that allows one to register layers. During runtime, registered layers can be called b...
Definition: blob.hpp:14