Package ml.shifu.guagua.example.nn
Class NNMaster
- java.lang.Object
-
- ml.shifu.guagua.example.nn.NNMaster
-
public class NNMaster extends Object implements ml.shifu.guagua.master.MasterComputable<NNParams,NNParams>
NNMasteris used to accumulate all workers NN parameters.All gradients are accumulated from workers to calculate model weights, and then new weights are sent to workers. Then workers use new weights to set their models and train for another iteration.
This logic follows Encog multi-core implementation.
To make sure workers and master use the same initialization weights, first iteration of this guagua application is used to compute initial weights which are then sent to works for their initial weights.
-
-
Constructor Summary
Constructors Constructor Description NNMaster()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NNParamscompute(ml.shifu.guagua.master.MasterContext<NNParams,NNParams> context)
-