Web-based user interface module for DeepLearning4J that provides visualization and monitoring capabilities for deep learning model training and evaluation
npx @tessl/cli install tessl/maven-org-deeplearning4j--deeplearning4j-ui_2-11@0.9.00
# DeepLearning4J UI
1
2
DeepLearning4J UI is a web-based user interface module that provides real-time visualization and monitoring capabilities for deep learning model training and evaluation. It offers interactive dashboards for tracking training progress, loss curves, network architecture visualization, and performance metrics through a web browser interface.
3
4
## Package Information
5
6
- **Package Name**: org.deeplearning4j:deeplearning4j-ui_2.11
7
- **Package Type**: maven
8
- **Language**: Java (with Scala components)
9
- **Installation**: Add to your Maven `pom.xml`:
10
11
```xml
12
<dependency>
13
<groupId>org.deeplearning4j</groupId>
14
<artifactId>deeplearning4j-ui_2.11</artifactId>
15
<version>0.9.1</version>
16
</dependency>
17
```
18
19
## Core Imports
20
21
```java
22
import org.deeplearning4j.ui.api.UIServer;
23
import org.deeplearning4j.ui.stats.StatsListener;
24
import org.deeplearning4j.ui.storage.InMemoryStatsStorage;
25
26
// Core API interfaces
27
import org.deeplearning4j.api.storage.Persistable;
28
import org.deeplearning4j.api.storage.StatsStorage;
29
import org.deeplearning4j.api.storage.StatsStorageRouter;
30
import org.deeplearning4j.api.storage.StorageMetaData;
31
32
// Statistics configuration
33
import org.deeplearning4j.ui.stats.api.StatsUpdateConfiguration;
34
import org.deeplearning4j.ui.stats.api.StatsInitializationConfiguration;
35
import org.deeplearning4j.ui.stats.api.StatsType;
36
import org.deeplearning4j.ui.stats.api.SummaryType;
37
```
38
39
## Basic Usage
40
41
```java
42
import org.deeplearning4j.ui.api.UIServer;
43
import org.deeplearning4j.ui.stats.StatsListener;
44
import org.deeplearning4j.ui.storage.InMemoryStatsStorage;
45
import org.deeplearning4j.nn.multilayer.MultiLayerNetwork;
46
47
// Start the UI server
48
UIServer uiServer = UIServer.getInstance();
49
50
// Create storage for training statistics
51
InMemoryStatsStorage statsStorage = new InMemoryStatsStorage();
52
53
// Attach the storage to the UI server
54
uiServer.attach(statsStorage);
55
56
// Create a listener to collect training statistics
57
StatsListener statsListener = new StatsListener(statsStorage);
58
59
// Add the listener to your neural network
60
MultiLayerNetwork network = new MultiLayerNetwork(conf);
61
network.init();
62
network.setListeners(statsListener);
63
64
// Train your network - statistics will be automatically collected and displayed
65
network.fit(trainingData);
66
67
// Access the UI at http://localhost:9000
68
```
69
70
## Architecture
71
72
The DeepLearning4J UI system is built around several key components:
73
74
- **UI Server**: Manages the web server and coordinates data visualization
75
- **Statistics Collection**: Listens to training events and collects metrics
76
- **Storage Systems**: Manages collected statistics data (memory, file, database)
77
- **Visualization Components**: Renders charts, graphs, and interactive displays
78
- **Remote Monitoring**: Enables distributed training visualization
79
80
## Capabilities
81
82
### UI Server Management
83
84
Central server management for the web-based monitoring interface.
85
86
```java { .api }
87
public abstract class UIServer {
88
public static synchronized UIServer getInstance();
89
public abstract String getAddress();
90
public abstract int getPort();
91
public abstract void attach(StatsStorage statsStorage);
92
public abstract void detach(StatsStorage statsStorage);
93
public abstract boolean isAttached(StatsStorage statsStorage);
94
public abstract List<StatsStorage> getStatsStorageInstances();
95
public abstract void enableRemoteListener();
96
}
97
```
98
99
[UI Server Management](./ui-server.md)
100
101
### Statistics Monitoring
102
103
Comprehensive training statistics collection and monitoring system.
104
105
```java { .api }
106
public class StatsListener extends BaseStatsListener {
107
public StatsListener(StatsStorageRouter router);
108
public StatsListener(StatsStorageRouter router, int listenerFrequency);
109
public StatsListener clone();
110
}
111
```
112
113
[Statistics Monitoring](./statistics.md)
114
115
### Storage Systems
116
117
Various storage backends for collected training statistics.
118
119
```java { .api }
120
public class InMemoryStatsStorage extends BaseCollectionStatsStorage {
121
public InMemoryStatsStorage();
122
public void putStaticInfo(Persistable staticInfo);
123
public void putUpdate(Persistable update);
124
}
125
```
126
127
[Storage Systems](./storage.md)
128
129
### Visualization Components
130
131
UI component system for building custom visualizations and reports.
132
133
```java { .api }
134
public abstract class Component {
135
// Base class for all UI components
136
}
137
138
public abstract class Chart extends Component {
139
// Base class for chart components
140
}
141
```
142
143
[Visualization Components](./components.md)
144
145
### Remote Monitoring
146
147
Remote iteration listeners for distributed training scenarios.
148
149
```java { .api }
150
public class WebReporter {
151
public static WebReporter getInstance();
152
public void queueReport(WebTarget target, Entity entity);
153
}
154
```
155
156
[Remote Monitoring](./remote-monitoring.md)
157
158
## Core Types
159
160
```java { .api }
161
// Storage interface for statistics data
162
public interface StatsStorage extends StatsStorageRouter {
163
List<String> listSessionIDs();
164
boolean sessionExists(String sessionID);
165
Persistable getStaticInfo(String sessionID, String typeID, String workerID);
166
List<Persistable> getAllStaticInfos(String sessionID, String typeID);
167
List<Persistable> getLatestUpdateAllWorkers(String sessionID, String typeID);
168
}
169
170
// Configuration for statistics collection
171
public interface StatsUpdateConfiguration {
172
long getReportingFrequency();
173
boolean collectParameterStats();
174
boolean collectActivationStats();
175
boolean collectGradientStats();
176
}
177
178
// Base interface for persistable data
179
public interface Persistable extends Serializable {
180
// Identification methods
181
String getSessionID();
182
String getTypeID();
183
String getWorkerID();
184
long getTimeStamp();
185
186
// Serialization methods
187
int encodingLengthBytes();
188
byte[] encode();
189
void encode(ByteBuffer buffer);
190
void encode(OutputStream outputStream) throws IOException;
191
void decode(byte[] decode);
192
void decode(ByteBuffer buffer);
193
void decode(InputStream inputStream) throws IOException;
194
}
195
196
// Enumeration of statistics types
197
public enum StatsType {
198
Parameters, Gradients, Updates, Activations
199
}
200
201
// Enumeration of summary types
202
public enum SummaryType {
203
Mean, Stdev, MeanMagnitudes
204
}
205
```