title: Importing tensorflow into Scala
body: <p>I have installed <a href="https://github.com/eaplatanios/tensorflow_scala" rel="nofollow noreferrer">Tensorflow for Scala</a> on my OSX, and although everything seemed fine, I have a NoClassDefFoundError when trying to run simple example like that –</p>
  
  <pre><code>   import org.platanios.tensorflow.api.Tensor
     val tensor = Tensor( 1.2, 4.5)
  </code></pre>
  
  <p>which gives:</p>
  
  <pre><code>java.lang.NoClassDefFoundError: Could not initialize class org.platanios.tensorflow.api.package$
      at #worksheet#.tensor$lzycompute(testone.sc:3)
      at #worksheet#.tensor(testone.sc:3)
      at #worksheet#.get$$instance$$tensor(testone.sc:3)
      at A$A16$.main(testone.sc:17)
      at A$A16.main(testone.sc)
      at #worksheet#.#worksheet#(testone.sc)
  </code></pre>
  
  <p>Similar error both on a Jupyter Notebook and an IntelliJ worksheet. My build.sbt:</p>
  
  <pre><code>scalaVersion := "2.12.4"
  
  resolvers += Resolver.sonatypeRepo("snapshots")
  libraryDependencies += "org.platanios" %% "tensorflow" % "0.1.2-SNAPSHOT"
  
  libraryDependencies += "org.platanios" %% "tensorflow" % "0.1.2-SNAPSHOT" classifier "darwin-cpu-x86_64"
  </code></pre>