Apache SINGA
A distributed deep learning platform .
 All Classes Namespaces Files Functions Variables Typedefs Macros
Public Member Functions | List of all members
singa::CDWorker Class Reference
Inheritance diagram for singa::CDWorker:
singa::Worker

Public Member Functions

void TrainOneBatch (int step, Metric *perf) override
 Train one mini-batch. More...
 
void TestOneBatch (int step, Phase phase, shared_ptr< NeuralNet > net, Metric *perf) override
 Test/validate one mini-batch.
 
- Public Member Functions inherited from singa::Worker
virtual void Init (int thread_id, int grp_id, int id)
 
void Setup (const JobProto &job, shared_ptr< NeuralNet > train_net, shared_ptr< NeuralNet > valid_net, shared_ptr< NeuralNet > test_net)
 Setup members.
 
void Run ()
 Main function of Worker. More...
 
void InitLocalParams ()
 Init all local params (i.e., params from layers resident in this worker). More...
 
void Checkpoint (int step, shared_ptr< NeuralNet > net)
 Checkpoint all params owned by the worker from the first group onto disk. More...
 
void Test (int nsteps, Phase phase, shared_ptr< NeuralNet > net)
 Test the perforance of the learned model on validation or test dataset. More...
 
void Report (const string &prefix, const Metric &perf)
 Report performance to the stub. More...
 
int Put (Param *param, int step)
 Put Param to server. More...
 
int Get (Param *param, int step)
 Get Param with specific version from server If the current version >= the requested version, then return. More...
 
int Update (Param *param, int step)
 Update Param. More...
 
int Collect (Param *param, int step)
 Block until the param is updated since sending the update request. More...
 
int CollectAll (shared_ptr< NeuralNet > net, int step)
 Call Collect for every param of net.
 
void ReceiveBlobs (bool data, bool grad, BridgeLayer *layer, shared_ptr< NeuralNet > net)
 Receive blobs from other workers due to model partitions.
 
void SendBlobs (bool data, bool grad, BridgeLayer *layer, shared_ptr< NeuralNet > net)
 Send blobs to other workers due to model partitions.
 
bool DisplayNow (int step) const
 Check is it time to display training info, e.g., loss and precison.
 
bool DisplayDebugInfo (int step) const
 Check is it time to display training info, e.g., loss and precison.
 
bool StopNow (int step) const
 Check is it time to stop.
 
bool CheckpointNow (int step) const
 Check is it time to do checkpoint.
 
bool TestNow (int step) const
 Check is it time to do test. More...
 
bool ValidateNow (int step) const
 Check is it time to do validation. More...
 
int grp_id () const
 
int id () const
 worker ID within the worker group.
 

Additional Inherited Members

- Static Public Member Functions inherited from singa::Worker
static WorkerCreate (const JobProto &proto)
 
- Protected Attributes inherited from singa::Worker
int thread_id_
 
int grp_id_
 
int id_
 
int step_
 
JobProto job_conf_
 
shared_ptr< NeuralNettrain_net_
 
shared_ptr< NeuralNettest_net_
 
shared_ptr< NeuralNetvalidation_net_
 
Dealerlayer_dealer_
 
Dealerdealer_
 

Member Function Documentation

void singa::CDWorker::TrainOneBatch ( int  step,
Metric perf 
)
overridevirtual

Train one mini-batch.

Test/Validation is done before training.

Implements singa::Worker.


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