# Can't visualize training process

**URL:** <https://community.konduit.ai/t/cant-visualize-training-process/997>\
**Category:** DL4J\
**Created:** [November 17, 2020, 2:54pm UTC](https://community.konduit.ai/t/cant-visualize-training-process/997 "2020-11-17T14:54:59Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![miterial](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/miterial/32/351_2.png) [@miterial](https://community.konduit.ai/u/miterial)\
**Post date:** [November 17, 2020, 2:54pm UTC](https://community.konduit.ai/t/cant-visualize-training-process/997/1 "2020-11-17T14:54:59Z")

</div>

Hello! I’m trying to visualize the model training but on `http://localhost:9000/train/overview` I don’t see any changes, just blank sections for graphs without any useful info; all I was able to see is diagram with layers on `/train/model` but again without any graphs.  
Here’s how I setup listener:

```auto
UIServer uiServer = UIServer.getInstance();
StatsStorage statsStorage = new InMemoryStatsStorage();
uiServer.attach(statsStorage);
MultiLayerNetwork model = ..... //create model, LSTM+RNN output layers
model.setListeners(new StatsListener(statsStorage), new ScoreIterationListener(10));
SequenceRecordReaderDataSetIterator trainDatasetIterator = .... // create iterator, regression=true
model.fit(trainDatasetIterator, 5);

```

And this dependency is in my pom.xml:

```auto
       <dependency>
            <groupId>org.deeplearning4j</groupId>
            <artifactId>deeplearning4j-ui</artifactId>
            <version>1.0.0-beta7</version>
        </dependency>

```

What can be the problem that I can’t see any output in graphs?

[my question on Gitter](https://gitter.im/eclipse/deeplearning4j?at=5facf154f2fd4f60fc6b83d7)

---

<div class="post-metadata">

**Author:** ![SidneyLann](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/sidneylann/32/367_2.png) [@SidneyLann](https://community.konduit.ai/u/SidneyLann)\
**Post date:** [November 18, 2020, 1:37am UTC](https://community.konduit.ai/t/cant-visualize-training-process/997/2 "2020-11-18T01:37:34Z")

</div>

uiServer.start();  
…

---

<div class="post-metadata">

**Author:** ![miterial](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/miterial/32/351_2.png) [@miterial](https://community.konduit.ai/u/miterial)\
**Post date:** [November 27, 2020, 6:45am UTC](https://community.konduit.ai/t/cant-visualize-training-process/997/3 "2020-11-27T06:45:30Z")

</div>

`org.deeplearning4j.ui.api.UIServer` doesn’t have method `start()`

---

<div class="post-metadata">

**Author:** ![SidneyLann](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/sidneylann/32/367_2.png) [@SidneyLann](https://community.konduit.ai/u/SidneyLann)\
**Post date:** [November 27, 2020, 9:01am UTC](https://community.konduit.ai/t/cant-visualize-training-process/997/4 "2020-11-27T09:01:30Z")

</div>

VertxUIServer uiServer = VertxUIServer.getInstance();  
uiServer.start();

---

<div class="post-metadata">

**Author:** ![miterial](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/miterial/32/351_2.png) [@miterial](https://community.konduit.ai/u/miterial)\
**Post date:** [November 27, 2020, 10:16am UTC](https://community.konduit.ai/t/cant-visualize-training-process/997/5 "2020-11-27T10:16:08Z")

</div>

this throws NullPointerException - `VertxUIServer.getInstance()` returns null. I tried this:

```auto
VertxUIServer uiServer = new VertxUIServer();
uiServer.start();

```

instead of

```auto
UIServer uiServer = UIServer.getInstance();

```

but the UI server won’t start at all, can’t access it on `http://localhost:9000`

---

<div class="post-metadata">

**Author:** ![agibsonccc](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/agibsonccc/32/697_2.png) [@agibsonccc](https://community.konduit.ai/u/agibsonccc)\
**Post date:** [November 27, 2020, 10:19am UTC](https://community.konduit.ai/t/cant-visualize-training-process/997/6 "2020-11-27T10:19:18Z")

</div>

@miterial Can you try to run this? [deeplearning4j-examples/BasicUIExample.java at master · eclipse/deeplearning4j-examples · GitHub](https://github.com/eclipse/deeplearning4j-examples/blob/master/dl4j-examples/src/main/java/org/deeplearning4j/examples/quickstart/features/userinterface/BasicUIExample.java)

Just see what it does out of the box. If our defaults are broken, then we can take a closer look.

---

<div class="post-metadata">

**Author:** ![miterial](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/miterial/32/351_2.png) [@miterial](https://community.konduit.ai/u/miterial)\
**Post date:** [November 27, 2020, 10:50am UTC](https://community.konduit.ai/t/cant-visualize-training-process/997/7 "2020-11-27T10:50:02Z")

</div>

Thank you for the suggestion of the official example but I think it doesn’t work for me either. I downloaded full repository, opened it in Intellij, run `BasicUIExample`, opened `http://localhost:9000`, waited for a while and saw only infinite page loading while the model was training; then the app closed.

Also tried `UIStorageExample` (with `collectStats=true` and then `false`), same result

---

<div class="post-metadata">

**Author:** ![agibsonccc](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/agibsonccc/32/697_2.png) [@agibsonccc](https://community.konduit.ai/u/agibsonccc)\
**Post date:** [November 27, 2020, 10:54am UTC](https://community.konduit.ai/t/cant-visualize-training-process/997/8 "2020-11-27T10:54:58Z")

</div>

@miterial ok if the default example isn’t working we can have a discussion. Could you clarify a bit about your environment and how you’re running it? Browser and stack traces on both front end and backend would really help.

Are you seeing anything in the chrome dev tools?

---

<div class="post-metadata">

**Author:** ![miterial](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/miterial/32/351_2.png) [@miterial](https://community.konduit.ai/u/miterial)\
**Post date:** [November 27, 2020, 11:03am UTC](https://community.konduit.ai/t/cant-visualize-training-process/997/9 "2020-11-27T11:03:22Z")

</div>

This is the log when I run `BasicUIExample` (I start it using Run button in Intellij IDE):

```java
"D:\Program Files\JetBrains\IntelliJ IDEA 2019.2.4\jbr\bin\java.exe" "-javaagent:D:\Program Files\JetBrains\IntelliJ IDEA 2019.2.4\lib\idea_rt.jar=54347:D:\Program Files\JetBrains\IntelliJ IDEA 2019.2.4\bin" -Dfile.encoding=UTF-8 -classpath C:\Users\XXX\AppData\Local\Temp\classpath1744542958.jar org.deeplearning4j.examples.quickstart.features.userinterface.BasicUIExample
o.n.l.f.Nd4jBackend - Loaded [CpuBackend] backend
o.n.n.NativeOpsHolder - Number of threads used for linear algebra: 4
o.n.l.c.n.CpuNDArrayFactory - ***********************************CPU Feature Check Warning***********************************
o.n.l.c.n.CpuNDArrayFactory - Warning: Initializing ND4J with Generic x86 binary on a CPU with AVX/AVX2 support
o.n.l.c.n.CpuNDArrayFactory - Using ND4J with AVX/AVX2 will improve performance. See deeplearning4j.org/cpu for more details
o.n.l.c.n.CpuNDArrayFactory - Or set environment variable ND4J_IGNORE_AVX=true to suppress this warning
o.n.l.c.n.CpuNDArrayFactory - *************************************************************************************************
o.n.n.Nd4jBlas - Number of threads used for OpenMP BLAS: 4
o.n.l.a.o.e.DefaultOpExecutioner - Backend used: [CPU]; OS: [Windows 10]
o.n.l.a.o.e.DefaultOpExecutioner - Cores: [8]; Memory: [2.0GB];
o.n.l.a.o.e.DefaultOpExecutioner - Blas vendor: [OPENBLAS]
o.d.n.m.MultiLayerNetwork - Starting MultiLayerNetwork with WorkspaceModes set to [training: ENABLED; inference: ENABLED], cacheMode set to [NONE]
o.d.u.VertxUIServer - Deeplearning4j UI server started at: http://localhost:9000
o.d.u.VertxUIServer - StatsStorage instance attached to UI: FileStatsStorage(C:\Users\XXX\AppData\Local\Temp\ui-stats.dl4j)
o.d.u.VertxUIServer - Deeplearning4j UI server is auto-stopping after thread (name: main) died.
o.d.u.VertxUIServer - Deeplearning4j UI server stopped.

Process finished with exit code 0

```

After log line “StatsStorage instance attached to UI” I open `http://localhost:9000` and there is nothing in browser console and this on Network tab:

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/konduit/original/1X/18284911f0dcf3d42d17f990699a94f20ce43fea.png)

---

<div class="post-metadata">

**Author:** ![SidneyLann](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/sidneylann/32/367_2.png) [@SidneyLann](https://community.konduit.ai/u/SidneyLann)\
**Post date:** [November 27, 2020, 11:06am UTC](https://community.konduit.ai/t/cant-visualize-training-process/997/10 "2020-11-27T11:06:56Z")

</div>

```
  VertxUIServer uiServer = VertxUIServer.getInstance(9000, false, null);
  uiServer.start();

```

this work for me

---

<div class="post-metadata">

**Author:** ![SidneyLann](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/sidneylann/32/367_2.png) [@SidneyLann](https://community.konduit.ai/u/SidneyLann)\
**Post date:** [November 27, 2020, 11:08am UTC](https://community.konduit.ai/t/cant-visualize-training-process/997/11 "2020-11-27T11:08:19Z")

</div>

![image](https://canada1.discourse-cdn.com/flex035/uploads/konduit/original/1X/662e2b444fc87316e57a4b782fd0e5159f533418.png)

---

<div class="post-metadata">

**Author:** ![agibsonccc](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/agibsonccc/32/697_2.png) [@agibsonccc](https://community.konduit.ai/u/agibsonccc)\
**Post date:** [November 27, 2020, 11:09am UTC](https://community.konduit.ai/t/cant-visualize-training-process/997/12 "2020-11-27T11:09:51Z")

</div>

> [@miterial](#):
>
> ```auto
> o.d.u.VertxUIServer - Deeplearning4j UI server is auto-stopping after thread (name: main) died.
> 
> ```

@SidneyLann thanks for chipping in!

@miterial  
This stands out for me:

```auto
o.d.u.VertxUIServer - Deeplearning4j UI server is auto-stopping after thread (name: main) died.

```

I wonder why the thread dies. We need to dig in to that a bit.

---

<div class="post-metadata">

**Author:** ![SidneyLann](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/sidneylann/32/367_2.png) [@SidneyLann](https://community.konduit.ai/u/SidneyLann)\
**Post date:** [November 27, 2020, 11:23am UTC](https://community.konduit.ai/t/cant-visualize-training-process/997/13 "2020-11-27T11:23:32Z")

</div>

The main thread is died, so the UI thread stop! the file path may not exist.

---

<div class="post-metadata">

**Author:** ![miterial](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/miterial/32/351_2.png) [@miterial](https://community.konduit.ai/u/miterial)\
**Post date:** [November 27, 2020, 11:32am UTC](https://community.konduit.ai/t/cant-visualize-training-process/997/14 "2020-11-27T11:32:26Z")

</div>

If I put `Scanner sc = new Scanner(System.in); sc.nextLine();` after the training is done, it prevents the thread from dying but the page is still not loaded.

@SidneyLann `VertxUIServer.getInstance(9000, false, null)` gives the same result as `UIServer.getInstance()`

---

<div class="post-metadata">

**Author:** ![SidneyLann](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/sidneylann/32/367_2.png) [@SidneyLann](https://community.konduit.ai/u/SidneyLann)\
**Post date:** [November 27, 2020, 11:34am UTC](https://community.konduit.ai/t/cant-visualize-training-process/997/15 "2020-11-27T11:34:45Z")

</div>

```
  VertxUIServer uiServer = VertxUIServer.getInstance(Integer.valueOf(port), false, null);
  uiServer.start();
  StatsStorage statsStorage = new InMemoryStatsStorage();
  uiServer.attach(statsStorage);
  net.setListeners(new StatsListener(statsStorage));

```

try it in memory first.

---

<div class="post-metadata">

**Author:** ![SidneyLann](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/sidneylann/32/367_2.png) [@SidneyLann](https://community.konduit.ai/u/SidneyLann)\
**Post date:** [November 27, 2020, 11:40am UTC](https://community.konduit.ai/t/cant-visualize-training-process/997/16 "2020-11-27T11:40:45Z")

</div>

```
  VertxUIServer uiServer = VertxUIServer.getInstance(9000, false, null);
  uiServer.start();
  StatsStorage statsStorage = new InMemoryStatsStorage();
  uiServer.attach(statsStorage);
  net.setListeners(new StatsListener(statsStorage));

```

try it in memory

---

<div class="post-metadata">

**Author:** ![miterial](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/miterial/32/351_2.png) [@miterial](https://community.konduit.ai/u/miterial)\
**Post date:** [November 27, 2020, 11:42am UTC](https://community.konduit.ai/t/cant-visualize-training-process/997/17 "2020-11-27T11:42:43Z")

</div>

Thanks for the full example but the result is unresponding page anyway.

And if I get back to my initial example - the page is loaded but nothing is displayed:

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/konduit/original/1X/2a1defb5f8c1099118ceba2db48dcfdb4f139011.png)

Maybe something is wrong with my training data? What should I take a look at to check why values are not plotted?

---

<div class="post-metadata">

**Author:** ![agibsonccc](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/agibsonccc/32/697_2.png) [@agibsonccc](https://community.konduit.ai/u/agibsonccc)\
**Post date:** [November 27, 2020, 12:09pm UTC](https://community.konduit.ai/t/cant-visualize-training-process/997/18 "2020-11-27T12:09:58Z")

</div>

@miterial no the main thread shouldn’t be dying. Something is triggering it and I’m not sure what. Out of memory? I would need more information or something I can use to reproduce it. As @SidneyLann is showing the UI works fine.

---

<div class="post-metadata">

**Author:** ![miterial](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/miterial/32/351_2.png) [@miterial](https://community.konduit.ai/u/miterial)\
**Post date:** [November 30, 2020, 10:27am UTC](https://community.konduit.ai/t/cant-visualize-training-process/997/19 "2020-11-30T10:27:06Z")

</div>

What other information do I need to provide so that you could reproduce it?

P.S. I’m not the only one who has this problem: [DL4J UI can fail to launch under some circumstances · Issue #9011 · eclipse/deeplearning4j · GitHub](https://github.com/eclipse/deeplearning4j/issues/9011)

---

<div class="post-metadata">

**Author:** ![printomi](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/printomi/32/129_2.png) [@printomi](https://community.konduit.ai/u/printomi)\
**Post date:** [November 30, 2020, 9:05pm UTC](https://community.konduit.ai/t/cant-visualize-training-process/997/20 "2020-11-30T21:05:17Z")

</div>

@miterial I don’t understand how did you get from the unresponding UI (instant auto-stop) to the loaded page. You can upload your code in a GitHub Gist.  
As you said, instant auto-stop is a known issue in 1.0.0-beta7 release.  
However, it would be interesting to see if you would get an exception different from [what I got in the above issue](https://github.com/eclipse/deeplearning4j/issues/9011#issuecomment-654090935) with the code that produced the unresponding UI, using the 1.0.0-SNAPSHOT version of DL4J in the pom.xml. UI Server would stop a bit later in a [shutdown hook](https://github.com/eclipse/deeplearning4j/pull/9005) and may produce more useful info this way.

[Next page](https://community.konduit.ai/t/cant-visualize-training-process/997.md?page=2)
