Neural Nets – The Neuron

The plan

each neuron will be a message reciever in haskell

notes

networking the neuron

  • an example

    Source: [2014-01-04 Sat], Implement a chat server – HaskellWiki #+NAME example of haskell message passing

    import Network.Socket
    
    main :: IO ()
    main = do
        -- create socket
        sock <- socket AF_INET Stream 0
        -- make socket immediately reusable - eases debugging.
        setSocketOption sock ReuseAddr 1
        -- listen on TCP port 4242
        bindSocket sock (SockAddrInet 4242 iNADDR_ANY)
        -- allow a maximum of 2 outstanding connections
        listen sock 2
        mainLoop sock
    
    mainLoop :: Socket -> IO ()
    mainLoop sock = do
        -- accept one connection and handle it
        conn <- accept sock
        runConn conn
        mainLoop sock
    
    runConn :: (Socket, SockAddr) -> IO ()
    runConn (sock, _) = do
        send sock "Hi!\n"
        sClose sock
    

no fixed neuron

  • It appears that in a distributed functional system,the neuron doesnt exist per se. It is merely a function of the weights the logit

the neuron function

  • is a calculation of the logit
  • a sending of the logit to all channels

the logit function

  • document from coursera

    but basically:

    • a call to the weights function to recieve weights
    • a call to channels to recieve the inputs
  • weights function
    • a call to the backprop channels to calculate new weights
    digraph G {
    rankdir = BT;
      a [ style=invis ]
      b [ label=Σ]
      c [ style=invis ]
      d [ style=invis ]
      b -> a
      c -> b
      d -> b
    }
    

    #+virtualneuron.png wpid-virtualneuron.png

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s