@@ -24,20 +24,20 @@ migrated from Bazel to Maven, which is more familiar for most Java developers.
24
24
25
25
The following describes the layout of the repository and its different artifacts:
26
26
27
- * ` core `
27
+ * ` tensorflow- core`
28
28
* All artifacts that build up the core language bindings of TensorFlow for Java.
29
29
* Those artifacts provide the minimal support required to use the TensorFlow runtime on a JVM.
30
30
31
- * ` utils `
31
+ * ` tensorflow- utils`
32
32
* Utility libraries that do not depend on the TensorFlow runtime but are useful for machine learning purposes
33
33
34
- * ` frameworks `
34
+ * ` tensorflow- frameworks`
35
35
* High-level APIs built on top of the core libraries for simplifying the usage of TensorFlow in Java.
36
36
37
- * ` starters `
37
+ * ` tensorflow- starters`
38
38
* Artifacts aggregating others for simplifying dependency management with TensorFlow
39
39
40
- * Note: Right now, only the ` core ` component is present*
40
+ * Note: Right now, only the ` tensorflow- core` component is present*
41
41
42
42
## Building Sources
43
43
@@ -48,26 +48,27 @@ Note that in some cases, if a version of the TensorFlow runtime library is not f
48
48
this process will fetch TensorFlow sources and trigger a build of all the native code (which can take
49
49
many hours on a standard laptop). In this case, you will also need to have a valid environment for building
50
50
TensorFlow, including the [ bazel] ( https://bazel.build/ ) build tool and a few python dependencies. Please
51
- read [ TensorFlow documentation] ( https://www.tensorflow.org/install ) for more details.
51
+ read [ TensorFlow documentation] ( https://www.tensorflow.org/install/source ) for more details.
52
52
53
53
## Using Maven Artifacts
54
54
55
- To include TensorFlow in your Maven application, you first need to add a dependency on both
56
- ` tensorflow-core ` and ` tensorflow-core-native ` artifacts. The later could be included multiple times
57
- for different targeted systems by their classifiers.
55
+ To include TensorFlow in your Maven application, you first need to add a dependency on either the
56
+ ` tensorflow-core ` or ` tensorflow-core-platform ` artifacts. The former could be included multiple times
57
+ for different targeted systems by their classifiers, while the later includes them as dependencies for
58
+ ` linux-x86_64 ` , ` macosx-x86_64 ` , and ` windows-x86_64 ` , with more to come in the future.
58
59
59
60
For example, for building a JAR that uses TensorFlow and is targeted to be deployed only on Linux
60
61
systems, you should add the following dependencies:
61
62
``` xml
62
63
<dependency >
63
64
<groupId >org.tensorflow</groupId >
64
- <artifactId >tensorflow-core</artifactId >
65
- <version >2.0 .0-SNAPSHOT</version >
65
+ <artifactId >tensorflow-core-api </artifactId >
66
+ <version >0.1 .0-SNAPSHOT</version >
66
67
</dependency >
67
68
<dependency >
68
69
<groupId >org.tensorflow</groupId >
69
- <artifactId >tensorflow-core-native </artifactId >
70
- <version >2.0 .0-SNAPSHOT</version >
70
+ <artifactId >tensorflow-core-api </artifactId >
71
+ <version >0.1 .0-SNAPSHOT</version >
71
72
<classifier >linux-x86_64</classifier >
72
73
</dependency >
73
74
```
@@ -77,45 +78,45 @@ native dependencies as follows:
77
78
``` xml
78
79
<dependency >
79
80
<groupId >org.tensorflow</groupId >
80
- <artifactId >tensorflow-core</artifactId >
81
- <version >2.0 .0-SNAPSHOT</version >
81
+ <artifactId >tensorflow-core-api </artifactId >
82
+ <version >0.1 .0-SNAPSHOT</version >
82
83
</dependency >
83
84
<dependency >
84
85
<groupId >org.tensorflow</groupId >
85
- <artifactId >tensorflow-core-native </artifactId >
86
- <version >2.0 .0-SNAPSHOT</version >
86
+ <artifactId >tensorflow-core-api </artifactId >
87
+ <version >0.1 .0-SNAPSHOT</version >
87
88
<classifier >linux-x86_64</classifier >
88
89
</dependency >
89
90
<dependency >
90
91
<groupId >org.tensorflow</groupId >
91
- <artifactId >tensorflow-core-native </artifactId >
92
- <version >2.0 .0-SNAPSHOT</version >
93
- <classifier >windows -x86_64</classifier >
92
+ <artifactId >tensorflow-core-api </artifactId >
93
+ <version >0.1 .0-SNAPSHOT</version >
94
+ <classifier >macosx -x86_64</classifier >
94
95
</dependency >
95
96
<dependency >
96
97
<groupId >org.tensorflow</groupId >
97
- <artifactId >tensorflow-core-native </artifactId >
98
- <version >2.0 .0-SNAPSHOT</version >
99
- <classifier >darwin -x86_64</classifier >
98
+ <artifactId >tensorflow-core-api </artifactId >
99
+ <version >0.1 .0-SNAPSHOT</version >
100
+ <classifier >windows -x86_64</classifier >
100
101
</dependency >
101
102
```
102
103
103
104
In some cases, pre-configured starter artifacts can help to automatically include all versions of
104
- the native library for a given configuration. For example, the ` tensorflow ` artifact includes
105
+ the native library for a given configuration. For example, the ` tensorflow-core-platform ` artifact includes
105
106
transitively all the artifacts above as a single dependency:
106
107
``` xml
107
108
<dependency >
108
109
<groupId >org.tensorflow</groupId >
109
- <artifactId >tensorflow</artifactId >
110
- <version >2.0 .0-SNAPSHOT</version >
110
+ <artifactId >tensorflow-core-platform </artifactId >
111
+ <version >0.1 .0-SNAPSHOT</version >
111
112
</dependency >
112
113
```
113
114
114
115
Be aware though that the native library is quite large and including too many versions of it may
115
116
significantly increase the size of your JAR. So it is good practice to limit your dependencies to
116
117
the platforms you are targeting.
117
118
118
- * Note: the ` tensorflow ` starter artifact is not available at this moment*
119
+ * Note: the ` tensorflow-starters ` artifact is not available at this moment*
119
120
120
121
## How to Contribute?
121
122
0 commit comments