There is a new version of TensorFlow Java that installs easily.
Currently this project is the TensorFlow Java hello world project but setup in Scala. One purpose is to check how well TensorFlow works with Scala on different platforms.
So far the results has been good: This installs cleanly on Linux, macOS and Windows.
Might also test out prebuild models for TensorFlow on different platforms.
cd tensorzoo
sbt test
sbt run
TensorFlow 2.3.1
Scala 3.0.0-M3
Scala 2.13.4
- Oracle JDK 8
- OpenJDK 11
It has been tested on
- macOS 11.1
- Ubuntu 20.04 running under WSL2
- Windows 10
The TensorFlow Java bindings are using Java generics that are pretty different from Scala generics.
Legacy Java https://github.com/tensorflow/tensorflow/tree/master/tensorflow/java.
There is better documentation for legacy including LabelImage.java example project.
Tried to port Legacy Java example to Scala and new Java bindings: LabelImage.scala. That was not easy, so it is currently incomplete.
New Java https://github.com/tensorflow/java.
Interface is quite different from legacy Java bindings.
There is a good project TensorFlow Scala with idiomatic Scala bindings. Here is a starter project.