protected void gradientUpdateCG(SGDTrainConfig config, DoubleMatrix x_samples, DoubleMatrix y_samples, SGDParam curr_param) {
DoubleMatrix curr_w = ((LRParam)curr_param).w;
DoubleMatrix curr_b = ((LRParam)curr_param).b;
LROptimizer lropt = new LROptimizer(config, x_samples, y_samples, curr_w, curr_b);
MyConjugateGradient cg = new MyConjugateGradient(lropt, config.getCgInitStepSize());
cg.setTolerance(config.getCgTolerance());
try {
cg.optimize(config.getCgMaxIterations());
} catch (Throwable e) {
logger.error("", e);
}
}