Skip to content

Commit 8a0374f

Browse files
committed
Updating Javadoc for v1.2.0
1 parent c61f328 commit 8a0374f

9,801 files changed

Lines changed: 533855 additions & 327175 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 52 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ The following describes the layout of the repository and its different artifacts
2828
* Intended audience: neural network developers
2929
* For more information: [tensorflow-framework/README.md](tensorflow-framework/README.md)
3030

31-
*Note: The NdArray Library module has now its own [repository](https://github.com/tensorflow/java-ndarray) and has been moved out of TensorFlow Java.*
31+
* `tensorflow-ndarray`
32+
* API for creating and manipulating n-dimensional arrays, can be used independently from TensorFlow.
3233

3334
## Communication
3435

@@ -60,29 +61,30 @@ only binaries for the following are being **supported and distributed** by this
6061
- `linux-x86_64-gpu`: Linux platforms on Intel/AMD chips with Cuda GPU support
6162
- `linux-arm64`: Linux platforms on Arm chips
6263
- `macosx-arm64`: MacOS X platforms on Apple Silicon chips
63-
- `windows-x86_64`: Windows platforms on Intel/AMD chips
6464

6565
Binaries for `macosx-x86_64` are available for TF-Java 1.0 series releases and earlier, they were dropped from
66-
TF-Java 1.1 and newer as they are no longer supported or released by Google.
66+
TF-Java 1.1 and newer as they are no longer supported or released by Google. Binaries for `windows-x86_64` are available
67+
for TF-Java 1.1 and earlier, they were dropped for the 1.2 release and newer as the native binaries are no longer supported or
68+
released by Google.
6769

6870
For example, for building a JAR that uses TensorFlow and is targeted to be deployed only on Linux
6971
systems with no GPU support, you should add the following dependencies:
7072
```xml
7173
<dependency>
7274
<groupId>org.tensorflow</groupId>
7375
<artifactId>tensorflow-core-api</artifactId>
74-
<version>1.1.0</version>
76+
<version>1.2.0</version>
7577
</dependency>
7678
<dependency>
7779
<groupId>org.tensorflow</groupId>
7880
<artifactId>tensorflow-core-native</artifactId>
79-
<version>1.1.0</version>
81+
<version>1.2.0</version>
8082
<classifier>linux-x86_64</classifier>
8183
</dependency>
8284
```
8385
Or Gradle:
8486
```groovy
85-
def tfVersion = '1.0.0'
87+
def tfVersion = '1.2.0'
8688
implementation "org.tensorflow:tensorflow-core-api:$tfVersion"
8789
implementation "org.tensorflow:tensorflow-core-native:$tfVersion:linux-x86_64"
8890
```
@@ -93,34 +95,33 @@ native dependencies as follows:
9395
<dependency>
9496
<groupId>org.tensorflow</groupId>
9597
<artifactId>tensorflow-core-api</artifactId>
96-
<version>1.1.0</version>
98+
<version>1.2.0</version>
9799
</dependency>
98100
<dependency>
99101
<groupId>org.tensorflow</groupId>
100102
<artifactId>tensorflow-core-native</artifactId>
101-
<version>1.1.0</version>
102-
<classifier>linux-x86_64-gpu</classifier>
103+
<version>1.2.0</version>
104+
<classifier>linux-arm64</classifier>
103105
</dependency>
104106
<dependency>
105107
<groupId>org.tensorflow</groupId>
106108
<artifactId>tensorflow-core-native</artifactId>
107-
<version>1.1.0</version>
108-
<classifier>macosx-arm64</classifier>
109+
<version>1.2.0</version>
110+
<classifier>linux-x86_64-gpu</classifier>
109111
</dependency>
110112
<dependency>
111113
<groupId>org.tensorflow</groupId>
112114
<artifactId>tensorflow-core-native</artifactId>
113-
<version>1.1.0</version>
114-
<classifier>windows-x86_64</classifier>
115+
<version>1.2.0</version>
116+
<classifier>macosx-arm64</classifier>
115117
</dependency>
116118
```
117119
Or Gradle:
118120
```groovy
119-
def tfVersion = '1.0.0'
121+
def tfVersion = '1.2.0'
120122
implementation "org.tensorflow:tensorflow-core-api:$tfVersion"
121123
implementation "org.tensorflow:tensorflow-core-native:$tfVersion:linux-x86_64-gpu"
122124
implementation "org.tensorflow:tensorflow-core-native:$tfVersion:macosx-arm64"
123-
implementation "org.tensorflow:tensorflow-core-native:$tfVersion:windows-x86_64"
124125
```
125126

126127
Only one dependency can be added per platform, meaning that you cannot add native dependencies to both `linux-x86_64` and
@@ -135,20 +136,20 @@ For Ubuntu 24.04, you can install them with the following command:
135136
In some cases, it might be preferable to add a single dependency that includes transitively all the artifacts
136137
required to run TensorFlow Java on any [supported platforms](README.md#individual-dependencies)
137138

138-
- `tensorflow-core-platform`: Includes `tensorflow-core-api`, plus native artifacts for `linux-x86_64`, `linux-x86_64-arm64`, `macosx-arm64` and `windows-x86_64`
139+
- `tensorflow-core-platform`: Includes `tensorflow-core-api`, plus native artifacts for `linux-x86_64`, `linux-arm64`, and `macosx-arm64`
139140

140141
For example, to run TensorFlow Java on any CPU platform for which a binary is being distributed by this project, you can
141142
simply add this dependency to your application:
142143
```xml
143144
<dependency>
144145
<groupId>org.tensorflow</groupId>
145146
<artifactId>tensorflow-core-platform</artifactId>
146-
<version>1.1.0</version>
147+
<version>1.2.0</version>
147148
</dependency>
148149
```
149150
Or Gradle:
150151
```groovy
151-
implementation "org.tensorflow:tensorflow-core-platform:1.0.0"
152+
implementation "org.tensorflow:tensorflow-core-platform:1.2.0"
152153
```
153154

154155
Be aware though that the builds of TensorFlow are quite voluminous and including too many native dependencies may
@@ -160,7 +161,7 @@ the conventions established on this page:
160161
### Snapshots
161162

162163
Snapshots of TensorFlow Java artifacts are automatically distributed after each update in the code. To use them, you need
163-
to add Sonatype OSS repository in your pom.xml, like the following
164+
to add Sonatype OSS repository in your `pom.xml`, like the following
164165

165166
```xml
166167
<repositories>
@@ -177,7 +178,7 @@ to add Sonatype OSS repository in your pom.xml, like the following
177178
<dependency>
178179
<groupId>org.tensorflow</groupId>
179180
<artifactId>tensorflow-core-platform</artifactId>
180-
<version>1.2.0-SNAPSHOT</version>
181+
<version>1.3.0-SNAPSHOT</version>
181182
</dependency>
182183
</dependencies>
183184
```
@@ -192,30 +193,45 @@ repositories {
192193
193194
dependencies {
194195
// Example of dependency, see section above for more options
195-
implementation "org.tensorflow:tensorflow-core-platform:1.2.0-SNAPSHOT"
196+
implementation "org.tensorflow:tensorflow-core-platform:1.3.0-SNAPSHOT"
196197
}
197198
```
198199

200+
## TensorFlow native libraries
201+
202+
TensorFlow-Java is built on top of the native TensorFlow library, and uses [JavaCPP](https://github.com/bytedeco/javacpp)
203+
to call that library which in turn uses the Java Native Interface (JNI). In [Java 24 and newer](https://openjdk.org/jeps/472)
204+
uses of JNI trigger a warning of the form:
205+
```
206+
WARNING: A restricted method in java.lang.System has been called
207+
WARNING: java.lang.System::loadLibrary has been called by org.bytedeco.javacpp.Loader in an unnamed module (file:/.../.m2/repository/org/bytedeco/javacpp/1.5.12/javacpp-1.5.12.jar)
208+
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
209+
WARNING: Restricted methods will be blocked in a future release unless native access is enabled
210+
```
211+
This is expected, and adding the `--enable-native-access=ALL-UNNAMED` flag to enable JNI will suppress it. In a future
212+
Java version this warning may be turned into an error and the flag will be required to use TensorFlow-Java.
213+
199214
## TensorFlow/Java Version Support
200215

201216
This table shows the mapping between TensorFlow, TensorFlow Java and minimum supported Java versions.
202217

203218
| TensorFlow Java Version | TensorFlow Version | Minimum Java Version |
204-
|-------------------------|--------------------| --------------- |
205-
| 0.2.0 | 2.3.1 | 8 |
206-
| 0.3.0 | 2.4.1 | 8 |
207-
| 0.3.1 | 2.4.1 | 8 |
208-
| 0.3.2 | 2.4.1 | 8 |
209-
| 0.3.3 | 2.4.1 | 8 |
210-
| 0.4.0 | 2.7.0 | 8 |
211-
| 0.4.1 | 2.7.1 | 8 |
212-
| 0.4.2 | 2.7.4 | 8 |
213-
| 0.5.0 | 2.10.1 | 11 |
214-
| 1.0.0-rc.1 | 2.16.1 | 11 |
215-
| 1.0.0-rc.2 | 2.16.2 | 11 |
216-
| 1.0.0 | 2.16.2 | 11 |
217-
| 1.1.0 | 2.18.0 | 11 |
218-
| 1.2.0-SNAPSHOT | 2.18.0 | 11 |
219+
|-------------------------|--------------------|----------------------|
220+
| 0.2.0 | 2.3.1 | 8 |
221+
| 0.3.0 | 2.4.1 | 8 |
222+
| 0.3.1 | 2.4.1 | 8 |
223+
| 0.3.2 | 2.4.1 | 8 |
224+
| 0.3.3 | 2.4.1 | 8 |
225+
| 0.4.0 | 2.7.0 | 8 |
226+
| 0.4.1 | 2.7.1 | 8 |
227+
| 0.4.2 | 2.7.4 | 8 |
228+
| 0.5.0 | 2.10.1 | 11 |
229+
| 1.0.0-rc.1 | 2.16.1 | 11 |
230+
| 1.0.0-rc.2 | 2.16.2 | 11 |
231+
| 1.0.0 | 2.16.2 | 11 |
232+
| 1.1.0 | 2.18.0 | 11 |
233+
| 1.2.0 | 2.21.0 | 11 |
234+
| 1.3.0-SNAPSHOT | 2.21.0 | 11 |
219235

220236
## How to Contribute?
221237

0 commit comments

Comments
 (0)