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

ParamInfo is used to construct a parameter shard. More...

#include <trainer.h>

Public Member Functions

 ParamInfo (shared_ptr< Param > p, int local, int owner)
 
void AddParam (shared_ptr< Param > p, int local, int owner)
 Associate the counter to a Param object. More...
 

Public Attributes

int num_update
 
int next_version
 all counters are atomic
 
int num_local
 

local workers uses the shared parameter


 
int num_total
 

total workers uses the shared parameter


 
int owner_procs
 the procs id of the worker that owns the parameter
 
vector< shared_ptr< Param > > shares
 

Detailed Description

ParamInfo is used to construct a parameter shard.

For each worker group: Every unique Param object is associated with a ParamCounter object whose param field points the to Param object itself.

Param objects sharing the same values (due to data parallelism) are associated with the same ParamCounter whose param field also shares the same values.

Usage: we need to aggregate gradients from all workers for the shared parameters before sending the update request. The nUpdate counter counts the number.

TODO test with different physical architectures.

Member Function Documentation

void singa::Trainer::ParamInfo::AddParam ( shared_ptr< Param p,
int  local,
int  owner 
)
inline

Associate the counter to a Param object.

Parameters
p
local1 if this Param object is used by workers in this procs, 0 otherwise
ownerthe procs id of the worker who ownes this Param object

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