eaplatanios / tensorflow_scala

TensorFlow API for the Scala Programming Language
http://platanios.org/tensorflow_scala/
Apache License 2.0
936 stars 96 forks source link

Are precompiled TF libraries still available? #158

Closed ljwagerfield closed 5 years ago

ljwagerfield commented 5 years ago

The following doesn't resolve in SBT:

libraryDependencies += "org.platanios" % "tensorflow" % "0.4.1" classifier "darwin-cpu-x86_64"

I'm not familiar with classifiers, but I would expect to see them listed in Maven, no? I can't seem to find them anywhere...

Is the only option to compile TF for myself?

If so, please can you advise which tag/release on the tensorflow repository to compile from? (I am using 0.4.1 of "org.platanios" % "tensorflow")

eaplatanios commented 5 years ago

Could you please try adding the following to your build file?

resolvers in ThisBuild += Resolver.sonatypeRepo("snapshots")

...

libraryDependencies += "org.platanios" % "tensorflow" % "0.4.2-SNAPSHOT" classifier "darwin-cpu-x86_64"
ljwagerfield commented 5 years ago

Yes, that seemed to work, thank you! (I had to use %% though.)

Just as an aside: which version of TensorFlow does this use?

I tried compiling TF for myself yesterday, and got it to work but only with r1.13 using bazel 0.20.0 (I received errors with r1.12 during runtime -- the Scala TF library couldn't find some method on the native TF library, so I assumed the Scala TF library was referencing newer stuff).

DirkToewe commented 5 years ago

There is a tensorFlowVersion entry in the build.sbt which You can check. Currently that should be 1.11.0, so 1.12 and 1.13 should work as well. There may be many reasons why the compiled binary is not working. If You get an undefined symbol error, take a look at this issue.