dl4j 模型保存的位置几种方式

倖福魔咒の 提交于 2019-12-09 14:40:03

File f = new File(FileUtils.getTempDirectory(), "xx.zip");
System.out.println(modelPath);

//C:\Users\小松\AppData\Local\Temp\xx.zip

File modelPath = new File(System.getProperty("java.io.tmpdir"), "xx.zip");
System.out.println(modelPath);

String rootPath = System.getProperty("user.dir");
 String modelDirPath = rootPath.substring(0, rootPath.lastIndexOf(File.separatorChar)) + File.separatorChar + "out" + File.separatorChar + "models";
String modelPath = modelDirPath + File.separatorChar + "xx.json";

//D:\workspace\JavaDL\out\models\xx.json

 

 

 

 

 

 

 

 

 

 

 

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!