# Dl4j Scala quickstart

**URL:** https://community.konduit.ai/t/dl4j-scala-quickstart/255
**Category:** DL4J
**Created:** [March 11, 2020, 6:37pm UTC](https://community.konduit.ai/t/dl4j-scala-quickstart/255 "2020-03-11T18:37:05Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Spark](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/spark/32/84_2.png) [@Spark](https://community.konduit.ai/u/Spark)
#### Post date: [March 11, 2020, 6:37pm UTC](https://community.konduit.ai/t/dl4j-scala-quickstart/255/1 "2020-03-11T18:37:05Z")

</div>

Hi Community

I am very new to Dl4j and has setup the environment with Scala in IntelliJ Idea.  
While following the quickstart [Dl4j Tutorial](https://deeplearning4j.org/tutorials/00-quickstart-for-deeplearning4j), Idea is showing a bunch of red lines. [Dl4j\_Scala|486x500](https://community.konduit.ai/uploads/short-url/w1FQCDEiYG9dpPbnGa88QfZbQJ2.png)

I would appreciate any help provided regarding a fix or workaround for this.

Thanks and Regards

---

<div class="post-metadata">

### Author: ![treo](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/treo/32/47_2.png) [@treo](https://community.konduit.ai/u/treo)
#### Post date: [March 11, 2020, 6:45pm UTC](https://community.konduit.ai/t/dl4j-scala-quickstart/255/2 "2020-03-11T18:45:45Z")

</div>

It looks like your problem is in line 61. Instead of assigning the built config to your variable, you are assigning just the builder. All of the errors that follow are because of that.

---

<div class="post-metadata">

### Author: ![Spark](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/spark/32/84_2.png) [@Spark](https://community.konduit.ai/u/Spark)
#### Post date: [March 12, 2020, 1:20pm UTC](https://community.konduit.ai/t/dl4j-scala-quickstart/255/3 "2020-03-12T13:20:51Z")

</div>

Thanks Treo!

I’ve been able to remove all red lines now, but am getting build error - “value stats is not a member of Nothing”.

Please help fix this as well.

 ![Build Errors](https://canada1.discourse-cdn.com/flex035/uploads/konduit/original/1X/5edee1e9e205b1a186acb8eaa4c6135b629f08bb.jpeg)

---

<div class="post-metadata">

### Author: ![Spark](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/spark/32/84_2.png) [@Spark](https://community.konduit.ai/u/Spark)
#### Post date: [March 12, 2020, 1:39pm UTC](https://community.konduit.ai/t/dl4j-scala-quickstart/255/4 "2020-03-12T13:39:40Z")

</div>

Similar error is thrown on using accuracy(), precision(), etc.  
Even if I remove stats() from the lines please let me know how to view different evaluation results.

---

<div class="post-metadata">

### Author: ![treo](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/treo/32/47_2.png) [@treo](https://community.konduit.ai/u/treo)
#### Post date: [March 12, 2020, 1:41pm UTC](https://community.konduit.ai/t/dl4j-scala-quickstart/255/5 "2020-03-12T13:41:07Z")

</div>

There you run into a peculiarity with Scala, it fails to infer the return type of `evaluate` and thinks it is `Nothing` while it actually is `Evaluation`. You should be able to replace it with `evaluate[Evaluation]` and `evaluateROC[ROC]` and things should work fine then.

---

<div class="post-metadata">

### Author: ![Spark](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/spark/32/84_2.png) [@Spark](https://community.konduit.ai/u/Spark)
#### Post date: [March 12, 2020, 4:58pm UTC](https://community.konduit.ai/t/dl4j-scala-quickstart/255/6 "2020-03-12T16:58:48Z")

</div>

Hi Treo

org.deeplearning4j.eval.Evaluation and ROC are showing depreciated.

Below is my build.sbt

name := “LearnDl4j”

version := “0.1”

scalaVersion := “2.13.1”

libraryDependencies ++= Seq(  
“org.deeplearning4j” % “deeplearning4j-cuda-10.0” % “1.0.0-beta6”,  
“org.nd4j” % “nd4j-native-platform” % “1.0.0-beta6”  
)

I think it might be something to do with library versions.

 ![Depreciated](https://canada1.discourse-cdn.com/flex035/uploads/konduit/original/1X/15cf99c6abaa5c979a92cf03706d7b022345fab5.png)

---

<div class="post-metadata">

### Author: ![treo](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/treo/32/47_2.png) [@treo](https://community.konduit.ai/u/treo)
#### Post date: [March 12, 2020, 5:49pm UTC](https://community.konduit.ai/t/dl4j-scala-quickstart/255/7 "2020-03-12T17:49:42Z")

</div>

Yes. We’ve moved those classes into ND4J, so if you import those classes from there, it will be just fine.

The deprecated classes have been left for compatibility with older versions.

---

<div class="post-metadata">

### Author: ![Spark](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/spark/32/84_2.png) [@Spark](https://community.konduit.ai/u/Spark)
#### Post date: [March 13, 2020, 4:51pm UTC](https://community.konduit.ai/t/dl4j-scala-quickstart/255/8 "2020-03-13T16:51:28Z")

</div>

Hi Treo

A heartful thanks for the helping hand and pulling me to the world of DL4J. Now I’ve been able to remove all build and runtime errors and succeeded to take the first step in learning DL4J. Looking forward to the learning.

Regards
