Wednesday, April 2, 2014

NNGPU architectural design finished

NNGPU is a GPU (CUDA) powered trainable artificial neural network simulator. It's designed to be able to manage not just multilayer perceptron (MLP) networks, but practically any kind of trainable networks. Supervised learning is to be used with backpropagation training algorithm. Ability of generalization of a network can be measured, both train and test sets can be provided. It's not a complete, fully optimized framework for making artificial neural networks; it's rather a GPGPU demonstration of speed relative to a single-threaded CPU implementation. I plan to make a comparison between (single-threaded) CPU and GPGPU run to evaluate effectiveness.

First I've made a use-case diagram on the functionality of NNGPU; here it is.

As you see, the description of structure and weights of a neural network can be loaded as an XML file and saved after the training is done. Here is the XML Schema for validation: http://pastebin.com/aVFLHzUy.

And an example XML containing three artificial neurons; one input, one hidden and one output connected to each other:

 <network>  
      <!--  
           Neurons of the network  
      -->  
      <neuron type="input">  
           <id>1</id>  
           <connections/>  
           <outputnum>1</outputnum>  
      </neuron>  
      <neuron type="hidden">  
           <id>2</id>  
           <!--  
                Neurons connected as input with  
                id and optional initial weight  
           -->  
           <inputs>  
                <neuron>  
                     <id>1</id>  
                     <weight>0.5</weight>  
                </neuron>  
           </inputs>  
           <!--  
                Number of neurons connected as output   
           -->  
           <outputnum>1</outputnum>  
      </neuron>  
      <neuron type="output">  
           <id>3</id>  
           <inputs>  
                <neuron>  
                     <id>2</id>  
                </neuron>  
           </inputs>  
      </neuron>  
 </network>  

I have done most of the design on a UML class diagram. Most of the comments needed are on the picture:

Now comes the implementation, coding part. I'll let you know when NNGPU can be tested. Till then, check the repository: https://bitbucket.org/csiki/nngpu.

No comments:

Post a Comment