I wrote the following code to make an interactive GUI for Mathematica's Neural Network example of
Here is the Code
DynamicModule[{l = {}},
{EventHandler[
Dynamic[s =
Graphics[{EdgeForm[Thick], White, Rectangle[{0, 0}, {2, 2}],
PointSize[.04], Black,
Point[l]}, {PlotRange -> {{0, 2}, {0,
2}}}]], {"MouseDragged" :> (l =
Append[l, MousePosition["Graphics"]])}]}]
and Then I feed $s$ into the Neural Network Dynamically
Dynamic[Thread[Image[s] -> lenet[Image[s]]]]
This works. But makes the whole thing slow if I am drawing.(I have an Amd Fx-4350 and 16 gigs of RAM). You may have also noticed that I am plotting points, which may not be the best choice for drawing. If you want to improve my code from any direction, you are welcome to do that