TensorFlow Java, on Windows 64

I’m trying to start my application in Java. I’m using Gradle.

I added my following lines to my Gradle build:

implementation('org.tensorflow:tensorflow-core-platform:0.4.1')

Github page says:

org.tensorflow tensorflow-core-api 0.4.1 org.tensorflow tensorflow-core-api 0.4.1 linux-x86_64${javacpp.platform.extension}

I don’t know how to put ‘classifier’ in Gradle dependencies.

Simply importing tensorflow-core-platform is fine to run on Windows. Selecting explicitly a native artifact is only useful to reduce the size of your application if you target a single platform.

If that matters for you, then in Gradle you can specify the classifier as:
org.tensorflow:tensorflow-core-api:0.4.1
org.tensorflow:tensorflow-core-api:0.4.1:windows-x86_64

(you need both)

1 Like