Java and TensorFlow

Content:

Original link: Running TensorFlow from Java 25 Without JNI or Python / TheMainThread.

Pythjon is the standard for data analysis and there are lots of libraries available for data analysis including TensorFlow.

Most of those libraries are a Python API around a computational engine in C/C++/Fortran. Including TensorFlow.

Such a C/C++/Fortran compuation engine can obviously be called from other languages as well.

The author shows how to use TensorFlow from Java.

Very detailed and good to get someone started.

I don't get the JNI vs FFM API emphasis. You could do the same using JNI. He chose to do it in FFM. That is fine - FFM is the newest API (JNI date back to mid 1990's!) - and seen from 2026 perspective then FFM has the advantage that the glue code is Java unlike JNI where the glue code is C/C++. But I don't see it as important. Two API's to do the same. Author chose the latest and best of the two. No surprise.

Comments: