本文整理汇总了Java中com.typesafe.config.Config.getDoubleList方法的典型用法代码示例。如果您正苦于以下问题:Java Config.getDoubleList方法的具体用法?Java Config.getDoubleList怎么用?Java Config.getDoubleList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.typesafe.config.Config
的用法示例。
在下文中一共展示了Config.getDoubleList方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Regularization
import com.typesafe.config.Config; //导入方法依赖的package包/类
public Regularization(Config config, String prefix) {
List<Double> l1List = config.getDoubleList(prefix + KEY + "l1");
l1 = new double[l1List.size()];
for (int i = 0; i < l1List.size(); i++) {
l1[i] = l1List.get(i);
}
List<Double> l2List = config.getDoubleList(prefix + KEY + "l2");
l2 = new double[l2List.size()];
for (int i = 0; i < l2List.size(); i++) {
l2[i] = l2List.get(i);
}
CheckUtils.check(l1.length == l2.length,
"%sl1 lenght must be equal to %sl2 lenght",
prefix + KEY,
prefix + KEY);
}
示例2: Hoag
import com.typesafe.config.Config; //导入方法依赖的package包/类
public Hoag(Config config, String prefix) {
init_step = config.getDouble(prefix + KEY + "init_step");
step_decr_factor = config.getDouble(prefix + KEY + "step_decr_factor");
test_loss_reduce_limit = config.getDouble(prefix + KEY + "test_loss_reduce_limit");
outer_iter = config.getInt(prefix + KEY + "outer_iter");
List<Double> l1List = config.getDoubleList(prefix + KEY + "l1");
List<Double> l2List = config.getDoubleList(prefix + KEY + "l2");
l1 = new double[l1List.size()];
l2 = new double[l2List.size()];
for (int i = 0; i < l2.length; i ++) {
l1[i] = l1List.get(i);
l2[i] = l2List.get(i);
}
CheckUtils.check(step_decr_factor < 1.0, "%sstep_decr_factor:%f must < 1.0",
prefix + KEY, step_decr_factor);
CheckUtils.check(l1.length == l2.length,
"%sl1 lenght must be equal to %sl2 lenght",
prefix + KEY,
prefix + KEY);
}
示例3: Grid
import com.typesafe.config.Config; //导入方法依赖的package包/类
public Grid(Config config, String prefix) {
List<Double> l1List = config.getDoubleList(prefix + KEY + "l1");
List<Double> l2List = config.getDoubleList(prefix + KEY + "l2");
CheckUtils.check(l1List.size() == l2List.size(),
"%sl1 length must be equal to %sl2 length",
prefix + KEY,
prefix + KEY);
l1 = new double[l1List.size() / 3][3];
l2 = new double[l2List.size() / 3][3];
for (int i = 0; i < l1.length; i++) {
for (int j = 0; j < 3; j++) {
l1[i][j] = l1List.get(i * 3 + j);
l2[i][j] = l2List.get(i * 3 + j);
}
}
}
示例4: GBSDTDataFlow
import com.typesafe.config.Config; //导入方法依赖的package包/类
public GBSDTDataFlow(IFileSystem fs,
Config config,
ThreadCommSlave comm,
int threadNum,
boolean needPyTransform,
String pyTransformScript) throws Exception {
super(fs, config, comm, threadNum, needPyTransform, pyTransformScript);
this.leafRange = config.getDoubleList("leaf_random_init_range");
LOG_UTILS.importantInfo("leaf_random_init_range:" + leafRange);
}