Click here to Skip to main content
11,566,785 members (52,630 online)
Click here to Skip to main content
Add your own
alternative version

Designing And Implementing A Neural Network Library For Handwriting Detection, Image Analysis etc.- The BrainNet Library - Full Code, Simplified Theory, Full Illustration, And Examples

, 21 Oct 2009 CPOL 227.4K 6K 351
This article will explain the actual concepts and implementation of Backward Propagation Neural Networks very easily - see project code and samples, like a simple pattern detector, a hand writing detection pad, an xml based neural network processing language etc in the source zip.
brainnet_src.zip
BrainNetIntro
NeuralGate
NeuralGate.vbproj.user
PatternDetector
PatternDetector.vbproj.user
TestImages
a1.bmp
b1.bmp
b2.bmp
c1.bmp
c2.bmp
D.bmp
D1.bmp
D2.bmp
E1.bmp
E2.bmp
Thumbs.db
Framework
BrainNet.suo
NetworkDataModel
Network.xsx
NeuralXML.xsx
NetworkIO.xsx
NeuralFramework.vbproj.user
nxml
nxml.vbproj.user
BrainNet.suo
Doc
Documentation.chm
Samples
HandWriting
HandWriting.suo
HandWriting.vbproj.user
'------------------------------------------------------------------
' License Notice:
'------------------------------------------------------------------
' All Rights Reserved - Anoop Madhusudanan, 
' Mail: amazedsaint@gmail.com
' Website: http://amazedsaint.blogspot.com

' See my articles about BrainNet at 
' http://amazedsaint-articles.blogspot.com for details
'
' You can use this code (or part of it), for non 
' commercial and academic uses, as long as 
'   - You are keeping this notice along with it
'   - You are not making any profit out of this
'------------------------------------------------------------------

'''<summary> A Factory for creating a backward propagation neural network</summary>
Public Class BackPropNetworkFactory
    Implements INetworkFactory

    '''<summary> Method to create a network. The input is a list of long values that represent the number
    '''of neurons in each layer</summary>
    Public Function CreateNetwork(ByVal neuronsInLayers As ArrayList) As BrainNet.NeuralFramework.INeuralNetwork
        Dim bnn As New NeuralNetwork()
        Dim neurons As Long

        Dim strategy As New BackPropNeuronStrategy()

        For Each neurons In neuronsInLayers
            Dim layer As NeuronLayer
            Dim i As Long

            layer = New NeuronLayer()

            For i = 0 To neurons - 1
                layer.Add(New Neuron(strategy))
            Next

            bnn.Layers.Add(layer)
        Next

        '''Connect all layers together
        bnn.ConnectLayers()
        Return bnn

    End Function

    '''<summary> Build a simple back prop neural network</summary>
    Public Function CreateNetwork(ByVal inputneurons As Long, ByVal outputneurons As Long) As BrainNet.NeuralFramework.INeuralNetwork Implements BrainNet.NeuralFramework.INetworkFactory.CreateNetwork

        Dim arr As ArrayList = New ArrayList()
        '''Add input layer
        arr.Add(inputneurons)
        '''Add a hidden layer
        arr.Add(inputneurons)
        '''Add the output layer
        arr.Add(outputneurons)

        Return CreateNetwork(arr)

    End Function

End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author


You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150624.2 | Last Updated 21 Oct 2009
Article Copyright 2006 by Anoop Madhusudanan
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid