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

Public Member Functions

 BPWorker (int thread_id, int group_id, int worker_id)
 
virtual void TrainOneBatch (int step)
 Train one mini-batch. More...
 
virtual void TestOneBatch (shared_ptr< NeuralNet > net, int step, Phase phase)
 Test/validate one mini-batch.
 
void Forward (shared_ptr< NeuralNet > net, int step, bool training)
 
void Backward (shared_ptr< NeuralNet > net, int step)
 
- Public Member Functions inherited from singa::Worker
 Worker (int thread_id, int group_id, int worker_id)
 
void Setup (const ModelProto &model, shared_ptr< NeuralNet > train_net)
 
void set_test_net (shared_ptr< NeuralNet > test_net)
 
void set_validation_net (shared_ptr< NeuralNet > val_net)
 
void Stop ()
 
int Put (shared_ptr< Param > param, int step)
 
int Get (shared_ptr< Param > param, int step)
 
int Update (shared_ptr< Param > param, int step)
 
int Collect (shared_ptr< Param > param, int step)
 
int CollectAll (shared_ptr< NeuralNet > net, int step)
 
void RunOneBatch (int step, Metric *perf=nullptr)
 check validation/test firstly, then TrainOneBatch Performance collects performance for the whole neuralnet. More...
 
void Test (shared_ptr< NeuralNet > net, int nsteps, const string &prefix)
 Test the perforance of the learned model on validation or test dataset. More...
 
virtual void Run ()
 Main function of Worker. More...
 
const bool DisplayNow (const int step) const
 Pull data from layers resident on other nodes due to Model Partition. More...
 
const bool DisplayDebugInfo (const int step) const
 
const void DisplayPerformance (const Metric &perf, const string &prefix)
 
const bool StopNow (const int step) const
 return true if the stop condition is satisfied, e.g., the maximum number of steps have been reached.
 
const bool CheckpointNow (const int step) const
 Check is it time to do checkpoint. More...
 
const bool TestNow (const int step) const
 Check is it time to do test. More...
 
const bool ValidateNow (const int step)
 Check is it time to do validation. More...
 
void ReceiveBlobs (shared_ptr< NeuralNet > net)
 start training from scratch. More...
 
void SendBlob ()
 

Additional Inherited Members

- Protected Attributes inherited from singa::Worker
int thread_id_
 
int group_id_
 
int worker_id_
 
int step_
 
ModelProto modelproto_
 
shared_ptr< NeuralNettrain_net_
 
shared_ptr< NeuralNettest_net_
 
shared_ptr< NeuralNetvalidation_net_
 
shared_ptr< Dealerlayer_dealer_
 
shared_ptr< Dealerparam_dealer_
 
Poller layer_poller_
 
Poller param_poller_
 

Member Function Documentation

virtual void singa::BPWorker::TrainOneBatch ( int  step)
virtual

Train one mini-batch.

Test/Validation is done before training.

Implements singa::Worker.


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