Commit f41939be by xiaotong

updates

parent a84f1cb0
......@@ -423,7 +423,19 @@ void XLeader::DestroyParamMap()
void XLeader::MakeParamMap()
{
DestroyParamMap();
for(int i = 0; i < jworkers.count; i++){
modelNum = jworkers.count;
paramMap = new XTensorKeeper*[serverModel.paramNum];
gradMap = new XTensorKeeper*[serverModel.paramNum];
for(int i = 0; i < serverModel.paramNum; i++){
paramMap[i] = new XTensorKeeper[modelNum];
gradMap[i] = new XTensorKeeper[modelNum];
for(int j = 0; j < modelNum; j++){
XModel * model = ((XWorkerJob*)jworkers[j])->GetModel();
paramMap[i][j].tensor = model->params[j].tensor;
gradMap[i][j].tensor = model->params[j].tensor;
}
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论