|
Java example source code file (TrainTest.java)
The TrainTest.java Java example source codepackage org.deeplearning4j.cli.subcommands; import org.apache.commons.io.FileUtils; import org.junit.Ignore; import org.junit.Test; import org.nd4j.linalg.io.ClassPathResource; import java.io.File; public class TrainTest { @Test @Ignore public void testLoadInputFormat() throws Exception { System.out.println("[testLoadInputFormat] Start"); //String testSVMLightInputFile = "src/test/resources/data/irisSvmLight.txt"; File resource = new ClassPathResource("confs/cli_train_unit_test_conf.txt").getFile(); if(!resource.isDirectory()) throw new IllegalStateException("Resolved to a directory"); String conf_file = resource.getAbsolutePath(); FileUtils.copyFile(new ClassPathResource("data/irisSvmLight.txt").getFile(),new File(System.getProperty("java.io.tmpdir"),"data/irisSvmLight.txt")); String[] args = { "-conf", conf_file ,"-input",conf_file}; Train train = new Train(args); try { train.loadConfigFile(); } catch (Exception e) { System.out.println( "could not load conf: " + e ); } train.execute(); System.out.println("[testLoadInputFormat] End"); } } Other Java examples (source code examples)Here is a short list of links related to this Java TrainTest.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.