Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Member Functions | Data Fields | Protected Attributes
caffe2::RecurrentNetworkOp< Context > Class Template Referencefinal
Inheritance diagram for caffe2::RecurrentNetworkOp< Context >:
caffe2::Operator< Context > caffe2::OperatorBase caffe2::Observable< OperatorBase >

Public Member Functions

 RecurrentNetworkOp (const OperatorDef &operator_def, Workspace *ws)
 
size_t NumObservers () override
 
std::vector< detail::RecurrentInputconstructRecurrentInputs (const OperatorDef &operator_def, Workspace *sharedWs)
 
std::vector< detail::OffsetAliasconstructAliases ()
 
void initializeBlobsToRecomputeOnBackward (Workspace *sharedBlobsWs)
 Some blobs can be marked as to be recomputed on backward pass. More...
 
std::vector< detail::LinkconstructLinks ()
 
template<typename T >
bool DoRunWithType ()
 
bool RunOnDevice () override
 
- Public Member Functions inherited from caffe2::Operator< Context >
 Operator (const OperatorDef &operator_def, Workspace *ws)
 
const Tensor< Context > & Input (int idx)
 
Tensor< Context > * Output (int idx)
 
void WaitEvent (const Event &ev, int stream_id=-1) final
 
void WaitEvents (const std::vector< const Event * > &events, int stream_id=-1) final
 
bool Run (int stream_id=0) final
 
bool RunAsync (int stream_id=0) final
 
bool IsStreamFree (int stream_id) const override
 
bool HasAsyncPart () const override
 
bool SupportsAsyncScheduling () const override
 
- Public Member Functions inherited from caffe2::OperatorBase
 OperatorBase (const OperatorDef &operator_def, Workspace *ws)
 
bool HasArgument (const string &name) const
 Checks if the operator has an argument of the given name.
 
template<typename T >
GetSingleArgument (const string &name, const T &default_value) const
 
template<typename T >
bool HasSingleArgumentOfType (const string &name) const
 
template<typename T >
vector< T > GetRepeatedArgument (const string &name, const vector< T > &default_value={}) const
 
template<typename T >
const T & Input (int idx)
 
template<typename T >
T * Output (int idx)
 
const BlobInputBlob (int idx)
 
BlobOutputBlob (int idx)
 
template<typename T >
bool InputIsType (int idx)
 
template<typename T >
bool OutputIsType (int idx)
 
int InputSize ()
 
int OutputSize ()
 
const vector< const Blob * > & Inputs () const
 
const vector< Blob * > & Outputs ()
 
vector< TensorShape > InputTensorShapes ()
 
void Wait (const OperatorBase &other, int stream_id=-1)
 
virtual void Finish ()
 
virtual void AddRelatedBlobInfo (EnforceNotMet *err)
 
const OperatorDef & debug_def () const
 
void set_debug_def (const std::shared_ptr< const OperatorDef > &operator_def)
 
bool has_debug_def () const
 
void RecordLastFailedOpNetPosition ()
 
int net_position () const
 
void set_net_position (int idx)
 
const DeviceOption & device_option () const
 
const Eventevent () const
 
Eventevent ()
 
void ResetEvent ()
 
void DisableEvent ()
 
bool IsEventDisabled () const
 
const std::string & type ()
 
void annotate_engine (const std::string &engine)
 
const std::string & engine () const
 
- Public Member Functions inherited from caffe2::Observable< OperatorBase >
const ObserverAttachObserver (std::unique_ptr< Observer > observer)
 
std::unique_ptr< ObserverDetachObserver (const Observer *observer_ptr)
 Returns a unique_ptr to the removed observer. More...
 
void StartAllObservers ()
 
void StopAllObservers ()
 

Data Fields

 USE_OPERATOR_CONTEXT_FUNCTIONS
 

Protected Attributes

NetDef stepNetDef_
 
WorkspacesharedWs_
 
bool enable_rnn_executor_
 
std::unique_ptr< RecurrentNetworkExecutorBasernnExecutor_
 
std::vector< detail::Linklinks_
 
std::vector< detail::OffsetAliasaliases_
 
std::vector< detail::RecurrentInputrecurrentInputs_
 
std::string timestep_
 
- Protected Attributes inherited from caffe2::Operator< Context >
Context context_
 
- Protected Attributes inherited from caffe2::OperatorBase
std::unique_ptr< Eventevent_
 
- Protected Attributes inherited from caffe2::Observable< OperatorBase >
std::vector< std::unique_ptr< Observer > > observers_list_
 

Additional Inherited Members

- Public Types inherited from caffe2::Observable< OperatorBase >
using Observer = ObserverBase< OperatorBase >
 
- Static Public Attributes inherited from caffe2::OperatorBase
static constexpr int kNoNetPositionSet = -1
 
- Protected Member Functions inherited from caffe2::Operator< Context >
void RecordEvent (const char *err_msg=nullptr) final
 
std::string getErrorMsg ()
 
- Protected Member Functions inherited from caffe2::OperatorBase
 DISABLE_COPY_AND_ASSIGN (OperatorBase)
 

Detailed Description

template<class Context>
class caffe2::RecurrentNetworkOp< Context >

Definition at line 189 of file recurrent_network_op.h.

Member Function Documentation

template<class Context >
void caffe2::RecurrentNetworkOp< Context >::initializeBlobsToRecomputeOnBackward ( Workspace sharedBlobsWs)
inline

Some blobs can be marked as to be recomputed on backward pass.

For those blobs, we do not want to allocate on each step workspace, but we instead store that blob in the shared workspace so all steps can use the same buffer on forward pass.

Definition at line 289 of file recurrent_network_op.h.


The documentation for this class was generated from the following file: