You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
src/server.nim
The Nim program, which compiles to C and trains the MLP and sends
the data to clientPlotly.js
src/protocol.nim
The (very simple) protocol used to transfer the data between the
two programs using WebSocket
src/resources:
A folder containing a file, which contains data used to initialize
the plots.
The demo consists of 2 different programs, a client and a server. The
server performs the actual training using Arraymancer. The client is
only used to plot the data. It uses nim-plotly (based on plotly.js)
for that.
Client
Since nim-plotly by default uses the C backend, some work had to be
done to be able to produce live updating plots. Using a static
template.html does not easily allow to call Plotly.react to replace
the content of the plot. Therefore, we use an experimental JS backend
for nim-plotly and call newPlot as well as react from that. But
because we cannot train the MLP using the JS backend, we need to split
the two into individual programs. The communication between the two
happens using WebSockets, with the data being sent as stringified
JSON.