Skip to content

Commit 9eb0357

Browse files
authored
Merge pull request #1 from saudet/master
Refactor modules and integrate JavaCPP to map the C API
2 parents ddf0b56 + 08477d4 commit 9eb0357

File tree

1,236 files changed

+134460
-570
lines changed

Some content is hidden

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

1,236 files changed

+134460
-570
lines changed

Diff for: README.md

+28-27
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,20 @@ migrated from Bazel to Maven, which is more familiar for most Java developers.
2424

2525
The following describes the layout of the repository and its different artifacts:
2626

27-
* `core`
27+
* `tensorflow-core`
2828
* All artifacts that build up the core language bindings of TensorFlow for Java.
2929
* Those artifacts provide the minimal support required to use the TensorFlow runtime on a JVM.
3030

31-
* `utils`
31+
* `tensorflow-utils`
3232
* Utility libraries that do not depend on the TensorFlow runtime but are useful for machine learning purposes
3333

34-
* `frameworks`
34+
* `tensorflow-frameworks`
3535
* High-level APIs built on top of the core libraries for simplifying the usage of TensorFlow in Java.
3636

37-
* `starters`
37+
* `tensorflow-starters`
3838
* Artifacts aggregating others for simplifying dependency management with TensorFlow
3939

40-
*Note: Right now, only the `core` component is present*
40+
*Note: Right now, only the `tensorflow-core` component is present*
4141

4242
## Building Sources
4343

@@ -48,26 +48,27 @@ Note that in some cases, if a version of the TensorFlow runtime library is not f
4848
this process will fetch TensorFlow sources and trigger a build of all the native code (which can take
4949
many hours on a standard laptop). In this case, you will also need to have a valid environment for building
5050
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.
5252

5353
## Using Maven Artifacts
5454

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.
5859

5960
For example, for building a JAR that uses TensorFlow and is targeted to be deployed only on Linux
6061
systems, you should add the following dependencies:
6162
```xml
6263
<dependency>
6364
<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>
6667
</dependency>
6768
<dependency>
6869
<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>
7172
<classifier>linux-x86_64</classifier>
7273
</dependency>
7374
```
@@ -77,45 +78,45 @@ native dependencies as follows:
7778
```xml
7879
<dependency>
7980
<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>
8283
</dependency>
8384
<dependency>
8485
<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>
8788
<classifier>linux-x86_64</classifier>
8889
</dependency>
8990
<dependency>
9091
<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>
9495
</dependency>
9596
<dependency>
9697
<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>
100101
</dependency>
101102
```
102103

103104
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
105106
transitively all the artifacts above as a single dependency:
106107
```xml
107108
<dependency>
108109
<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>
111112
</dependency>
112113
```
113114

114115
Be aware though that the native library is quite large and including too many versions of it may
115116
significantly increase the size of your JAR. So it is good practice to limit your dependencies to
116117
the platforms you are targeting.
117118

118-
*Note: the `tensorflow` starter artifact is not available at this moment*
119+
*Note: the `tensorflow-starters` artifact is not available at this moment*
119120

120121
## How to Contribute?
121122

Diff for: core/pom.xml

-82
This file was deleted.

Diff for: core/tensorflow-core-native/BUILD

-67
This file was deleted.

Diff for: core/tensorflow-core-native/WORKSPACE

-42
This file was deleted.

Diff for: core/tensorflow-core-native/config/exported_symbols.lds

-3
This file was deleted.

Diff for: core/tensorflow-core-native/config/version_script.lds

-11
This file was deleted.

0 commit comments

Comments
 (0)