# Maven

### 配置 Maven 构建工具

你可以通过Maven使用DL4J，将以下内容添加到你的`pom.xml`：

```markup
<dependencies>
  <dependency>
      <groupId>org.deeplearning4j</groupId>
      <artifactId>deeplearning4j-core</artifactId>
      <version>1.0.0-beta6</version>
  </dependency>
</dependencies>
```

下面的指令适用于所有DL4J和ND4J子模块，例如 `deeplearning4j-api`, `deeplearning4j-scaleout`和ND4J后端。

### 添加一个后端

DL4J依赖于ND4J用于硬件特定的实现和张量操作。通过将下面的代码粘贴到你的`pom.xml文件`中来添加后端:

```markup
<dependencies>
  <dependency>
      <groupId>org.nd4j</groupId>
      <artifactId>nd4j-native-platform</artifactId>
      <version>1.0.0-beta6</version>
  </dependency>
</dependencies>
```

你还可以把 [GPUs](https://deeplearning4j.org/docs/latest/deeplearning4j-config-gpu-cpu) 替换为标准的CPU实现


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://deeplearning4j.konduit.ai/zhong-wen-v1.0.0/pei-zhi/maven.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
