Caffe
|
Processes time-varying inputs using a simple recurrent neural network (RNN). Implemented as a network unrolling the RNN computation in time. More...
#include <rnn_layer.hpp>
Public Member Functions | |
RNNLayer (const LayerParameter ¶m) | |
virtual const char * | type () const |
![]() | |
RecurrentLayer (const LayerParameter ¶m) | |
virtual void | LayerSetUp (const vector< Blob< Dtype > * > &bottom, const vector< Blob< Dtype > * > &top) |
virtual void | Reshape (const vector< Blob< Dtype > * > &bottom, const vector< Blob< Dtype > * > &top) |
virtual void | Reset () |
virtual int | MinBottomBlobs () const |
virtual int | MaxBottomBlobs () const |
virtual int | ExactNumTopBlobs () const |
virtual bool | AllowForceBackward (const int bottom_index) const |
Protected Member Functions | |
virtual void | FillUnrolledNet (NetParameter *net_param) const |
Fills net_param with the recurrent network architecture. Subclasses should define this – see RNNLayer and LSTMLayer for examples. | |
virtual void | RecurrentInputBlobNames (vector< string > *names) const |
Fills names with the names of the 0th timestep recurrent input Blob&s. Subclasses should define this – see RNNLayer and LSTMLayer for examples. | |
virtual void | RecurrentOutputBlobNames (vector< string > *names) const |
Fills names with the names of the Tth timestep recurrent output Blob&s. Subclasses should define this – see RNNLayer and LSTMLayer for examples. | |
virtual void | RecurrentInputShapes (vector< BlobShape > *shapes) const |
Fills shapes with the shapes of the recurrent input Blob&s. Subclasses should define this – see RNNLayer and LSTMLayer for examples. | |
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. | |
![]() | |
virtual void | Forward_cpu (const vector< Blob< Dtype > * > &bottom, const vector< Blob< Dtype > * > &top) |
virtual void | Forward_gpu (const vector< Blob< Dtype > * > &bottom, const vector< Blob< Dtype > * > &top) |
virtual void | Backward_cpu (const vector< Blob< Dtype > * > &top, const vector< bool > &propagate_down, const vector< Blob< Dtype > * > &bottom) |
Additional Inherited Members | |
![]() | |
shared_ptr< Net< Dtype > > | unrolled_net_ |
A Net to implement the Recurrent functionality. | |
int | N_ |
The number of independent streams to process simultaneously. | |
int | T_ |
The number of timesteps in the layer's input, and the number of timesteps over which to backpropagate through time. | |
bool | static_input_ |
Whether the layer has a "static" input copied across all timesteps. | |
int | last_layer_index_ |
The last layer to run in the network. (Any later layers are losses added to force the recurrent net to do backprop.) | |
bool | expose_hidden_ |
Whether the layer's hidden state at the first and last timesteps are layer inputs and outputs, respectively. | |
vector< Blob< Dtype > * > | recur_input_blobs_ |
vector< Blob< Dtype > * > | recur_output_blobs_ |
vector< Blob< Dtype > * > | output_blobs_ |
Blob< Dtype > * | x_input_blob_ |
Blob< Dtype > * | x_static_input_blob_ |
Blob< Dtype > * | cont_input_blob_ |
Processes time-varying inputs using a simple recurrent neural network (RNN). Implemented as a network unrolling the RNN computation in time.
Given time-varying inputs , computes hidden state
, and outputs
.