 | Client Side Neural Network |  |
The client side implementation of a neural network is very compact and flexible. You can use it to connect all sorts of differnet configurations and run simple test cases before scaling things up (running a larger version on the GPU).
Most importantly, it provide a test case for your parallel compute version - if there are any problems or bugs - then you can compare the two version. For instance, you can pre-train the network weights and biases - save them and load them onto your GPU version (check the forward phase generates the same results).
Data is the real beast! Neural networks are very elegent and beautify? I guess you could say, bringing them together creates the 'beauty and the beast' scenario. Data is huge, non-linear, dirty and difficult to model - but with a bit of time - neural networks works with the data (come together).
 | XOR (2-3-1 Network) |  |
The implementation for the neural network is very elegant and straightfoward - it doens't include any bells and whistles at this stage. Just about getting thigns up and running - them porting it to the compute shader.
Checking the code works and that it matches the CPU (JavaScript) version.
• Simple neural networks - tested with xor and back propagation
• 'Arrays' of data - shifting all the neural network data to large blocks of arrays - accessed using indexes
• Scalable solution - define the network dimensions, e.g., layers = [2,3,4.....]
• Be warned - adding lots of extra layers - really slows down the training
• Left the debug check code in - e.g., manual unrolling of arrays/loops for the fixed case test [2,3,1] - xor.
• Some asserts scattered around to check basic array size aligment/data
The following shows what the output for implementation looks like. Note there will be slight differences on the expected numerical results - as the starting weights are picked randomly.
|