deeplearning4j README

The project's README from github.com/deeplearning4j/deeplearning4j. As one markdown file: README.md.

Documentation Get help at the community forum javadoc javadoc License GitHub commit activity

The Eclipse Deeplearning4J (DL4J) ecosystem is a set of projects intended to support all the needs of a JVM based deep learning application. This means starting with the raw data, loading and preprocessing it from wherever and whatever format it is in to building and tuning a wide variety of simple and complex deep learning networks.

Because Deeplearning4J runs on the JVM you can use it with a wide variety of JVM based languages other than Java, like Scala, Kotlin, Clojure and many more.

The DL4J stack comprises of:

All projects in the DL4J ecosystem support Windows, Linux and macOS. Hardware support includes CUDA GPUs (10.0, 10.1, 10.2 except OSX), x86 CPU (x86_64, avx2, avx512), ARM CPU (arm, arm64, armhf) and PowerPC (ppc64le).

Community Support

For support for the project, please go over to https://community.konduit.ai/

Using Eclipse Deeplearning4J in your project

Deeplearning4J has quite a few dependencies. For this reason we only support usage with a build tool.

<dependencies>
  <dependency>
      <groupId>org.eclipse.deeplearning4j</groupId>
      <artifactId>deeplearning4j-core</artifactId>
      <version>1.0.0-M2.1</version>
  </dependency>
  <dependency>
      <groupId>org.eclipse.deeplearning4j</groupId>
      <artifactId>nd4j-native-platform</artifactId>
      <version>1.0.0-M2.1</version>
  </dependency>
</dependencies>

Add these dependencies to your pom.xml file to use Deeplearning4J with the CPU backend. A full standalone project example is available in the example repository, if you want to start a new Maven project from scratch.

Code samples

Due to DL4J being a multi faceted project with several modules in the mono repo, we recommend looking at the examples for a taste of different usages of the different modules. Below we'll link to examples for each module.

  1. ND4J: https://github.com/deeplearning4j/deeplearning4j-examples/tree/master/nd4j-ndarray-examples
  2. DL4J: https://github.com/deeplearning4j/deeplearning4j-examples/tree/master/dl4j-examples
  3. Samediff: https://github.com/deeplearning4j/deeplearning4j-examples/tree/master/samediff-examples
  4. Datavec: https://github.com/deeplearning4j/deeplearning4j-examples/tree/master/data-pipeline-examples
  5. Python4j: https://deeplearning4j.konduit.ai/python4j/tutorials/quickstart

For users looking for being able to run models from other frameworks, see:

  1. Onnx: https://github.com/deeplearning4j/deeplearning4j-examples/tree/master/onnx-import-examples
  2. Tensorflow/Keras: https://github.com/deeplearning4j/deeplearning4j-examples/tree/master/tensorflow-keras-import-examples

Documentation, Guides and Tutorials

You can find the official documentation for Deeplearning4J and the other libraries of its ecosystem at http://deeplearning4j.konduit.ai/.

Want some examples?

We have separate repository with various examples available: https://github.com/eclipse/deeplearning4j-examples

Building from source

It is preferred to use the official pre-compiled releases (see above). But if you want to build from source, first take a look at the prerequisites for building from source here: https://deeplearning4j.konduit.ai/multi-project/how-to-guides/build-from-source. Various instructions for cpu and gpu builds can be found there. Please go to our forums for further help.

Running tests

In order to run tests, please see the platform-tests module. This module only runs on jdk 11 (mostly due to spark and bugs with older scala versions + JDK 17)

platform-tests allows you to run dl4j for different backends. There are a few properties you can specify on the command line:

  1. backend.artifactId: this defaults to nd4j-native and will run tests on cpu,you can specify other backends like nd4j-cuda-11.6
  2. dl4j.version: You can change the dl4j version that the tests run against. This defaults to 1.0.0-SNAPSHOT.

More parameters can be found here: https://github.com/deeplearning4j/deeplearning4j/blob/c1bf8717e4839c8930e9c43183bf7b94d0cf84dc/platform-tests/pom.xml#L47

Running project in Intellij IDEA:

  1. Ensure you follow https://stackoverflow.com/questions/45370178/exporting-a-package-from-system-module-is-not-allowed-with-release on jdk 9 or later
  2. Ignore all nd4j-shade submodules. Right click on each folder and click: Maven -> Ignore project

License

Apache License 2.0

Commercial Support

Deeplearning4J is actively developed by the team at Konduit K.K..

[If you need any commercial support feel free to reach out to us. at [email protected]

deeplearning4j (deeplearning4j/deeplearning4j)

Searching Database…

这是什么?Eclipse Deeplearning4J 是一套面向 JVM 的库,用于构建、训练和部署深度学习应用,可以在 Java、Scala、Kotlin 和 Clojure 中使用。
它是一个库,还是一整套技术栈?是由六个项目组成的技术栈:DL4J(高层网络 API)、ND4J(线性代数)、SameDiff(自动微分)、DataVec(ETL)、LibND4J(C++ 核心)和 Python4J。
怎么把它加到我的项目里?只能通过构建工具:把 Deeplearning4j 的依赖添加到你的 pom.xml 中,并从 CPU 后端开始;如果是全新项目,还有一个独立的 Maven 示例项目可以用。
我可以用 Scala 或 Kotlin 吗,还是只支持 Java?任何 JVM 语言都可以——Scala、Kotlin、Clojure 等等——因为一切都运行在 JVM 上;除了一个 JDK 和一个构建工具,你什么都不需要装,GPU 训练用的 CUDA 是可选的。
我能导入现有的 TensorFlow、Keras 或 ONNX 模型吗?Keras 的 .h5 模型(包括 tf.keras)可以导入到 DL4J,SameDiff 也能读取 TensorFlow 冻结的 .pb 文件;对 SameDiff 而言,ONNX、SavedModel 和 Keras 的导入仍在计划中。
它能在 Windows 和 macOS 上运行吗,还是只支持 Linux?生态中的每个项目都支持 Windows、Linux 和 macOS,但 macOS 上没有 CUDA GPU 加速。
我能在商业产品中使用它吗?可以——它采用 Apache License 2.0,商业使用完全没问题;如果你需要,Konduit K.K. 团队也提供付费的商业支持。
我的 GPU 真的会用于训练吗?在 CUDA GPU 上可以(10.0、10.1、10.2,macOS 除外);在 x86 CPU 上它通过 OpenBLAS 或 OneDNN 使用 AVX2/512 指令,ARM 和 PowerPC CPU 也受支持。
SameDiff 是什么?它是 ND4J 内置的自动微分和深度学习框架。它像 TensorFlow 的图模式一样采用先定义后执行的图结构;急切执行已在计划中,自定义层和损失函数也很容易编写。
我能在 JVM 里运行 Python 代码吗?可以——生态中自带 Python4J,它能从 JVM 中执行 CPython,因此可以把 Python 工具混入基于 Java 的深度学习流程中。
它能加载和预处理哪些数据?DataVec 负责机器学习数据的 ETL,支持多种格式:HDFS、Spark、图像、视频、音频、CSV、Excel 等,涵盖从原始加载到预处理的完整过程。
What are similar projects?horovod, onnxruntime, CNTK, onnx, keras, faceswap, spaCy, DeepFaceLab
Size
812.1 MB
Stars
14.3K
Updated
CommitFeb 23
Age
12y
Commits · 90 Days