Let's build DNN from scratch in C # and see how it works
Python + Keras is a common method, but this time I made it from scratch with the familiar Visual Studio2022 and C # to understand the theory.
nnet_test1 [Visual Studio 2022, C#]
The simplest fully connected model. Enter the value of the upper left 4 squares. The black line learns and discriminates 4 patterns of horizontal, vertical, diagonal, or uniform.
- The squares are grayscale (255 levels).
- Convert the value (0-255) of each cell to float (0-0.9999) and input it to the input layer.
- From the input layer to the middle layer. (green if the connection weight is negative, red if positive)
- From the middle layer to the output layer. (horizon, vertical, cross, solid)
- Update weights by error backpropagation.
There are 4 squares, but there are also 9 squares (3x3).
There are 15 middle layer, but there are also 50 or 100 petterns. There is also a 9 x 50 x 50 x 6 pattern with an additional middle layer.
Dynamically generated with supervised data including noise. 10,000 learnings. If you repeat it 10 times, you will get almost the correct answer.