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

[examples] added basic ops examples and how to use in Toree notebook #98

Closed Mageswaran1989 closed 5 years ago

Mageswaran1989 commented 6 years ago

@eaplatanios Please let me know your ideas on writing example code. Let us keep the ball rolling this time.

Mageswaran1989 commented 6 years ago

I am still getting following error when tried to use the source code from Intellij:

at org.platanios.tensorflow.api.core.client.Session$.apply$default$1(Session.scala:195)
at org.platanios.tensorflow.examples.PlaceHolders$.main(PlaceHolders.scala:52)
at org.platanios.tensorflow.examples.PlaceHolders.main(PlaceHolders.scala)

Caused by: org.platanios.tensorflow.jni.NotFoundException: /tmp/tensorflow_scala_native_libraries8209494604093884544/libtensorflow_ops.so: undefined symbol: _ZN6google8protobuf8internal26fixed_address_empty_stringE at org.platanios.tensorflow.jni.TensorFlow$.loadOpLibrary(Native Method) at org.platanios.tensorflow.jni.TensorFlow$.$anonfun$load$6(TensorFlow.scala:107) at scala.Option.foreach(Option.scala:257)

However when I use SBT build.sb like below, I am getting no errors:


name := "tensorflow_scala_examples"

version := "0.1"

scalaVersion := "2.12.5"

resolvers += Resolver.sonatypeRepo("snapshots")
libraryDependencies += "org.platanios" %% "tensorflow" % "0.1.1"
libraryDependencies += "org.platanios" %% "tensorflow" % "0.1.1" classifier "linux-cpu-x86_64"
eaplatanios commented 5 years ago

@Mageswaran1989 That is because I think Intellij hasn't updated the project to match your build configuration. Could you try synchronizing SBT in Intellij?

eaplatanios commented 5 years ago

I'm closing this due to inactivity and will reopen if needed.