其他分享
首页 > 其他分享> > DL4J实战之一:准备

DL4J实战之一:准备

作者:互联网

欢迎访问我的GitHub

https://github.com/zq2599/blog_demos

内容:所有原创文章分类汇总及配套源码,涉及Java、Docker、Kubernetes、DevOPS等;

关于DL4J

关于《DL4J实战》系列

本篇概览

  1. 确定环境和版本信息
  2. 创建名为dl4j-tutorials的maven工程作为父工程,后面整个系列的代码都是dl4j-tutorial的子工程
  3. 创建名为commons的子工程,这里面是一些常用的工具代码,例如下载数据集、绘图等

源码下载

名称 链接 备注
项目主页 https://github.com/zq2599/blog_demos 该项目在GitHub上的主页
git仓库地址(https) https://github.com/zq2599/blog_demos.git 该项目源码的仓库地址,https协议
git仓库地址(ssh) git@github.com:zq2599/blog_demos.git 该项目源码的仓库地址,ssh协议

在这里插入图片描述

版本信息

本系列实战都是在以下环境进行,这里列出来供您参考:

  1. 操作系统:win10 64位专业版
  2. JDK:1.8.0_281
  3. maven:3.6.2
  4. IEDA:2021.1.1 (Ultimate Edition)
  5. DL4J:1.0.0-beta7

《DL4J实战》系列源码的公用父工程

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.bolingcavalry</groupId>
    <artifactId>dlfj-tutorials</artifactId>
    <version>1.0-SNAPSHOT</version>
    <modules>
        <module>commons</module>
        <module>classifier-iris</module>
    </modules>
    <packaging>pom</packaging>

    <properties>
        <java.version>1.8</java.version>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>

        <dl4j-master.version>1.0.0-beta7</dl4j-master.version>
        <!-- Change the nd4j.backend property to nd4j-cuda-X-platform to use CUDA GPUs -->
        <!-- <nd4j.backend>nd4j-cuda-10.2-platform</nd4j.backend> -->
        <nd4j.backend>nd4j-native</nd4j.backend>
        <java.version>1.8</java.version>
        <maven-compiler-plugin.version>3.6.1</maven-compiler-plugin.version>
        <maven.minimum.version>3.3.1</maven.minimum.version>
        <exec-maven-plugin.version>1.4.0</exec-maven-plugin.version>
        <maven-shade-plugin.version>2.4.3</maven-shade-plugin.version>
        <jcommon.version>1.0.23</jcommon.version>
        <jfreechart.version>1.0.13</jfreechart.version>
        <logback.version>1.1.7</logback.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.freemarker</groupId>
                <artifactId>freemarker</artifactId>
                <version>2.3.29</version>
            </dependency>
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-common</artifactId>
                <version>4.1.48.Final</version>
            </dependency>
            <dependency>
                <groupId>org.nd4j</groupId>
                <artifactId>${nd4j.backend}</artifactId>
                <version>${dl4j-master.version}</version>
            </dependency>
            <dependency>
                <groupId>org.datavec</groupId>
                <artifactId>datavec-api</artifactId>
                <version>${dl4j-master.version}</version>
            </dependency>
            <dependency>
                <groupId>org.datavec</groupId>
                <artifactId>datavec-data-image</artifactId>
                <version>${dl4j-master.version}</version>
            </dependency>
            <dependency>
                <groupId>org.datavec</groupId>
                <artifactId>datavec-local</artifactId>
                <version>${dl4j-master.version}</version>
            </dependency>
            <dependency>
                <groupId>org.deeplearning4j</groupId>
                <artifactId>deeplearning4j-datasets</artifactId>
                <version>${dl4j-master.version}</version>
            </dependency>
            <dependency>
                <groupId>org.deeplearning4j</groupId>
                <artifactId>deeplearning4j-core</artifactId>
                <version>${dl4j-master.version}</version>
            </dependency>
            <dependency>
                <groupId>org.deeplearning4j</groupId>
                <artifactId>deeplearning4j-ui</artifactId>
                <version>${dl4j-master.version}</version>
            </dependency>
            <dependency>
                <groupId>org.deeplearning4j</groupId>
                <artifactId>deeplearning4j-zoo</artifactId>
                <version>${dl4j-master.version}</version>
            </dependency>
            <!-- ParallelWrapper & ParallelInference live here -->
            <dependency>
                <groupId>org.deeplearning4j</groupId>
                <artifactId>deeplearning4j-parallel-wrapper</artifactId>
                <version>${dl4j-master.version}</version>
            </dependency>
            <!-- Used in the feedforward/classification/MLP* and feedforward/regression/RegressionMathFunctions example -->
            <dependency>
                <groupId>jfree</groupId>
                <artifactId>jfreechart</artifactId>
                <version>${jfreechart.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jfree</groupId>
                <artifactId>jcommon</artifactId>
                <version>${jcommon.version}</version>
            </dependency>
            <!-- Used for downloading data in some of the examples -->
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>4.3.5</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback.version}</version>
            </dependency>
            <dependency>
                <groupId>org.datavec</groupId>
                <artifactId>datavec-data-codec</artifactId>
                <version>${dl4j-master.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bytedeco</groupId>
                <artifactId>javacv-platform</artifactId>
                <version>1.5.2</version>
            </dependency>

            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>1.16.16</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
</project>

子工程commons

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>dlfj-tutorials</artifactId>
        <groupId>com.bolingcavalry</groupId>
        <version>1.0-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>commons</artifactId>
    <dependencies>
        <dependency>
            <groupId>org.datavec</groupId>
            <artifactId>datavec-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
        </dependency>
        <dependency>
            <groupId>org.deeplearning4j</groupId>
            <artifactId>deeplearning4j-core</artifactId>
        </dependency>
        <dependency>
            <groupId>jfree</groupId>
            <artifactId>jfreechart</artifactId>
        </dependency>
    </dependencies>
</project>
  1. DataUtilities:下载和解压指定地址对应的文件
  2. DownloaderUtility:DL4J为我们准备了丰富的数据集(例如150个鸢尾花数据,带标签),这些内容保存在云端(AZURE),通过DownloaderUtility可以很方便的下载和解压这些数据集
  3. PlotUtil:绘制二维图形
  4. VAEPlotUtil:绘制变分自编码图形

在这里插入图片描述

你不孤单,欣宸原创一路相伴

  1. Java系列
  2. Spring系列
  3. Docker系列
  4. kubernetes系列
  5. 数据库+中间件系列
  6. DevOps系列

欢迎关注公众号:程序员欣宸

微信搜索「程序员欣宸」,我是欣宸,期待与您一同畅游Java世界...
https://github.com/zq2599/blog_demos

标签:实战,dl4j,deeplearning4j,DL4J,version,master,准备,org
来源: https://www.cnblogs.com/bolingcavalry/p/15383867.html