代码拉取完成,页面将自动刷新
deeplearning4j 教程
视频教程列表:Deeplearning4j - 入门视频
哔哩哔哩直达地址:https://space.bilibili.com/327018681/#/
DeepLearning4J(DL4J)是一套基于Java语言的神经网络工具包,可以构建、定型和部署神经网络。DL4J与Hadoop和Spark集成,支持分布式CPU和GPU,为商业环境(而非研究工具目的)所设计。Skymind是DL4J的商业支持机构。
Deeplearning4j拥有先进的技术,以即插即用为目标,通过更多预设的使用,避免多余的配置,让非企业也能够进行快速的原型制作。DL4J同时可以规模化定制。DL4J遵循Apache 2.0许可协议,一切以其为基础的衍生作品均属于衍生作品的作者。
因为使用的maven管理项目,所以第一次使用的时候更改maven配置。更改仓库地址为国内的阿里云
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>central</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
mvn dependency:copy-dependencies -DoutputDirectory=target/lib
参考资料:
参考资料:
参考资料:
参考资料:
参考资料:
参考资料:
参考资料
参考资料:
参考资料:
参考资料:
用于在模型训练过程中,指定最好模型保存的位置:
MultiLayerNetwork
类型的网络结果ComputationGraph
类型的网络结果//Conduct early stopping training:
EarlyStoppingResult result = trainer.fit();
System.out.println("Termination reason: " + result.getTerminationReason());
System.out.println("Termination details: " + result.getTerminationDetails());
System.out.println("Total epochs: " + result.getTotalEpochs());
System.out.println("Best epoch number: " + result.getBestModelEpoch());
System.out.println("Score at best epoch: " + result.getBestModelScore());
//Print score vs. epoch
Map<Integer,Double> scoreVsEpoch = result.getScoreVsEpoch();
List<Integer> list = new ArrayList<>(scoreVsEpoch.keySet());
Collections.sort(list);
System.out.println("Score vs. Epoch:");
for( Integer i : list){
System.out.println(i + "\t" + scoreVsEpoch.get(i));
}
// 构造数据模型
ZooModel zooModel = VGG16.builder().build();
ComputationGraph vgg16 = (ComputationGraph) zooModel.initPretrained();
FineTuneConfiguration fineTuneConf = new FineTuneConfiguration.Builder()
.updater(new Nesterovs(0.1, 0.9))
.seed(123)
.build();
用于指定那个层以下为非 frozen 层,非冻结层。
removeVertexKeepConnections
和 addLayer
或者是 addVertex
进行网络结构的更改参考资料:
根据GRU前向公式推导反向公式,并在dl4j中实现。
参考资料:
参考资料:
参考资料:
参考资料:
参考资料:
参考资料:
配置 pom.xml
文件
<repositories>
<repository>
<id>snapshots-repo</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy> <!-- Optional, update daily -->
</snapshots>
</repository>
</repositories>
自动获取 skymind 所提供的 jar 包编译更新
ok, so there's 2 ways
(a) use SparkContext.parallelize (that's a standard spark op) - easy but bad performance (all preprocessing happens on master)
(b) write a better data pipeline that does the proper reading + conversion in parallel
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。