source/train/XLeader.cpp
void XLeader::SetServerModel(XConfig * config, XModel * model, XList * memberModels)
{
    serverModel.Clear();
    for (int i = 0; i < model->paramNum; i++) {
        XTensor * param = model->params[i].tensor;
        serverModel.AddParam(param);
    }

    /* TODO: we can place parameters on different devices */
}
/* 
Set the server model. It distributes the server-side parameters on different devices.
>> config - the configuration
>> model - the base model
>> memberModels - the models that run on different devices. We can place
                  the server-side parameters on different member models.
*/
Set the server model. It distributes the server-side parameters on different devices.
Set the server model . It distributes the server - side parameters on different devices .
void XLeader::SetServerModel(XConfig * config, XModel * model, XList * memberModels)
{
    serverModel.Clear();
    for (int i = 0; i < model->paramNum; i++) {
        XTensor * param = model->params[i].tensor;
        serverModel.AddParam(param);
    }
}
void XLeader :: SetServerModel ( XConfig * config , XModel * model , XList * memberModels ) { serverModel . Clear ( ) ; for ( int i = 0 ; i < model -> paramNum ; i ++ ) { XTensor * param = model -> params [ i ] . tensor ; serverModel . AddParam ( param ) ; } }
Set the server model.
Set the server model .
/* TODO: we can place parameters on different devices */