1 #ifndef CAFFE_RNN_LAYER_HPP_
2 #define CAFFE_RNN_LAYER_HPP_
8 #include "caffe/blob.hpp"
9 #include "caffe/common.hpp"
10 #include "caffe/layer.hpp"
11 #include "caffe/layers/recurrent_layer.hpp"
12 #include "caffe/net.hpp"
13 #include "caffe/proto/caffe.pb.h"
17 template <
typename Dtype>
class RecurrentLayer;
29 template <
typename Dtype>
32 explicit RNNLayer(
const LayerParameter& param)
35 virtual inline const char*
type()
const {
return "RNN"; }
47 #endif // CAFFE_RNN_LAYER_HPP_
A layer factory that allows one to register layers. During runtime, registered layers can be called b...
Definition: blob.hpp:14
virtual const char * type() const
Returns the layer type.
Definition: rnn_layer.hpp:35
An abstract class for implementing recurrent behavior inside of an unrolled network. This Layer type cannot be instantiated – instead, you should use one of its implementations which defines the recurrent architecture, such as RNNLayer or LSTMLayer.
Definition: lstm_layer.hpp:17
virtual void FillUnrolledNet(NetParameter *net_param) const
Fills net_param with the recurrent network architecture. Subclasses should define this – see RNNLaye...
Definition: rnn_layer.cpp:42
virtual void RecurrentInputBlobNames(vector< string > *names) const
Fills names with the names of the 0th timestep recurrent input Blob&s. Subclasses should define this ...
Definition: rnn_layer.cpp:14
virtual void RecurrentOutputBlobNames(vector< string > *names) const
Fills names with the names of the Tth timestep recurrent output Blob&s. Subclasses should define this...
Definition: rnn_layer.cpp:20
virtual void RecurrentInputShapes(vector< BlobShape > *shapes) const
Fills shapes with the shapes of the recurrent input Blob&s. Subclasses should define this – see RNNL...
Definition: rnn_layer.cpp:26
Processes time-varying inputs using a simple recurrent neural network (RNN). Implemented as a network...
Definition: rnn_layer.hpp:30
virtual void OutputBlobNames(vector< string > *names) const
Fills names with the names of the output blobs, concatenated across all timesteps. Should return a name for each top Blob. Subclasses should define this – see RNNLayer and LSTMLayer for examples.
Definition: rnn_layer.cpp:36