當前位置: 首頁>>代碼示例>>Java>>正文


Java Config.getDoubleList方法代碼示例

本文整理匯總了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);

}
 
開發者ID:yuantiku,項目名稱:ytk-learn,代碼行數:19,代碼來源:LossParams.java

示例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);
}
 
開發者ID:yuantiku,項目名稱:ytk-learn,代碼行數:22,代碼來源:HyperParams.java

示例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);
        }
    }


}
 
開發者ID:yuantiku,項目名稱:ytk-learn,代碼行數:22,代碼來源:HyperParams.java

示例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);
}
 
開發者ID:yuantiku,項目名稱:ytk-learn,代碼行數:11,代碼來源:GBSDTDataFlow.java


注:本文中的com.typesafe.config.Config.getDoubleList方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。