use of com.tencent.angel.ml.model.PSModel in project angel by Tencent.
the class GBDTController method pushHistogram.
private void pushHistogram(int nid, int bytesPerItem) {
String histParaName = this.param.gradHistNamePrefix + nid;
PSModel histMat = this.model.getPSModel(histParaName);
try {
if (bytesPerItem == 8) {
histMat.increment(0, this.histCache[nid]);
} else {
QuantifyDoubleFunc func = new QuantifyDoubleFunc(histMat.getMatrixId(), 0, this.histCache[nid], bytesPerItem * 8);
histMat.update(func);
}
} catch (Exception e) {
LOG.error(histParaName + " increment failed, ", e);
}
}
Aggregations