Apache SINGA
A distributed deep learning platform .
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros
Public Member Functions | Protected Attributes | List of all members
singa::Param Class Reference

Public Member Functions

virtual MsgGenGetMsg (void *arg=nullptr)
 
virtual MsgGenPutMsg (void *arg=nullptr)
 
virtual MsgGenUpdateMsg (void *arg=nullptr)
 
virtual MsgGenSyncMsg (void *arg=nullptr)
 
virtual MsgHandleGetMsg (Msg **msg)
 
virtual MsgHandlePutMsg (Msg **msg)
 
virtual int ParseUpdateMsg (Msg **msg)
 
virtual MsgGenUpdateResponseMsg (void *arg=nullptr)
 
virtual MsgHandleSyncMsg (Msg **msg)
 
virtual int ParseGetResponseMsg (Msg **msg)
 
virtual int ParsePutResponseMsg (Msg **msg)
 
virtual int ParseUpdateResponseMsg (Msg **msg)
 
virtual int ParseSyncResponseMsg (Msg **msg)
 
virtual void Setup (const ParamProto &proto, const std::vector< int > &shape, int fan_in)
 setup param shape
 
virtual void Init (int v=0)
 
void ShareData (shared_ptr< Param > other)
 
float learning_rate_multiplier ()
 
float weight_decay_multiplier ()
 
const std::string & name ()
 
const int owner () const
 if the Param shares data with others, then owner is the id of that param. More...
 
int id () const
 
void set_id (int id)
 
int version () const
 
void set_version (int v)
 
int size () const
 
const Blob< float > & data ()
 Return const mem address for the content of this parameter.
 
Blob< float > * mutable_data ()
 
const Blob< float > & grad ()
 Return gradient of this parameter.
 
Blob< float > * mutable_grad ()
 
const Blob< float > & history ()
 
Blob< float > * mutable_history ()
 
float * mutable_cpu_data ()
 
float * mutable_cpu_grad ()
 
float * mutable_cpu_history ()
 

Protected Attributes

std::string name_
 name of the parameter used to share wights between neuralnets
 
shared_ptr< Blob< float > > data_
 
Blob< float > grad_
 gradient, history gradient of this parameter
 
Blob< float > history_
 
ParamProto proto_
 
int fan_in_
 

Member Function Documentation

const int singa::Param::owner ( ) const
inline

if the Param shares data with others, then owner is the id of that param.

otherwise it is itself's id.

int singa::Param::size ( ) const
inline
Returns
num of floats.

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