25
NEURAL NETWORK LANGUAGE NNL Language Project

Neural Network Language NNL

  • Upload
    aysha

  • View
    115

  • Download
    0

Embed Size (px)

DESCRIPTION

Language Project. Neural Network Language NNL. Neural Network. Neural networks have a mass appeal Simulates brain characteristics Weighted connection to nodes. Neural Network cont. A neural network consists of four main parts: 1. Processing units. - PowerPoint PPT Presentation

Citation preview

Page 1: Neural Network Language NNL

NEURAL NETWORK LANGUAGE

NNL

Language Project

Page 2: Neural Network Language NNL

Neural Network

Neural networks have a mass appeal Simulates brain characteristics

Weighted connection to nodes

Page 3: Neural Network Language NNL

A neural network consists of four main parts: 1. Processing units. 2. Weighted interconnections between the

various processing units which determine how the activation of one unit leads to input for another unit.

3. An activation rule which acts on the set of input signals at a unit to produce a new output signal, or activation.

4. Optionally, a learning rule that specifies how to adjust the weights for a given input/output pair.

Neural Network cont.

Page 4: Neural Network Language NNL

Learning method is back propagationError is calculated at result nodesThis error is then fed backward through the netAdjustments to weight reduce errorWe look at our result nodes and Output node

which is the last node, andThe difference we get is the error

Learning and predicting

Page 5: Neural Network Language NNL

Predicting Predicting is summation of weights

Dendrites have input valueInput times weight gives valueAll value summed give total activation

Page 6: Neural Network Language NNL
Page 7: Neural Network Language NNL

Parameters Internal parameters

Learning rate Threshold

Dendrite initial valueValueRand

Activation formulaTriangleLogistic linear

Page 8: Neural Network Language NNL

Elements sense-

Gets input from the file Input is in sequence

dendrite- Connects neurons Has weight Weight is a floating value from 0-1

Page 9: Neural Network Language NNL

soma – body of a neuron

synapse – It is used for connection. It determines

which dendrite will go to which neuron

result – results are supplied to this node

Elements cont

Page 10: Neural Network Language NNL

Parts of Language The derived NN Engine consists of three parts1. Framework initialization

Link necessary files

2. Topology implementation NNL specific code

3. Processor Process input using topology

Page 11: Neural Network Language NNL

Properties Its imperative Keywords are not case sensitive Id’s are case sensitive Last neuron of layer is one to one relationship with

result We can implement two neural networks, take the same

sense values and get different results to compare Readable Writable We are using functions without declarations Functions can take any values Error will be caught in semantics

Page 12: Neural Network Language NNL

Input and Output Network input

Format in in in … in # out out …outError checking for input file

Network output The output file is same formatPopulate empty output with predictions

Page 13: Neural Network Language NNL

Grammar Used A-> O; A  | D; A | N ; A | Y; A | S ; A | R;A| e O-> soma I F     --------body of a neuron E->dendrite E I-> id Y->synapse II     --------- a connection F->function P P->( P’) P’->Z,P’| Z D-> dendrite I F    -------- input to neuron N -> neuron E   --- a neuron composed of  soma and dendrite S->sense Z I   ---- information is supplied to this node R-> result Z id ---- results are supplied to this node Z->number

Page 14: Neural Network Language NNL

Sample Code // create first neuron (Logistic and Triangle are functions)

soma s1 Logistic(10, 2, 5); dendrite d1 Value(1);dendrite d2 Rand(1,2);neuron n1 s1 d1 d2 ;

// create second neuronsoma s2 Triangle(3);dendrite d3 Value(1);dendrite d4 Rand(1,2);neuron n2 s2 d3 d4 ;

Page 15: Neural Network Language NNL

// create second neuronsoma s3 Triangle(3);dendrite d5 value(4);dendrite d6 Rand(1,2);neuron n3 s3 d5 d6;

// connect neuronssynapse n2 d2;synapse n3 d1;

// input sense 1 d1;sense 2 d3;sense 3 d4;

// out result 1 n1;

Page 16: Neural Network Language NNL

Engine

Performs analysis on neurons Detects layer of neuron order neurons in a list by layer

Processes neuronCascades to get predictionsPerforms back propagation

Input dataStreams data from input fileCheck data for errors

Output dataWrites results

Page 17: Neural Network Language NNL

Traversing neurons

Page 18: Neural Network Language NNL

Compiler Lexical Analyzer

Removes commentsConditions codeTokenizes

Parser Recursive descent Does not do static semantic

Page 19: Neural Network Language NNL

Compiler cont. Semantics

checks ids declarations Checks how ids are assembled

Code generation Transforms NNL code into java Adds the engine

Page 20: Neural Network Language NNL

Creating network

System Interactions

Using network

Page 21: Neural Network Language NNL

Example Detecting letters

detect L and T in a 5 by 5 gridCompare L and T – no false positiveCompare random results (noise rejection)

TopologyOne layer networkOne output Twenty five inputs

Page 22: Neural Network Language NNL

Example cont.

Page 23: Neural Network Language NNL
Page 24: Neural Network Language NNL

Future Enhancements Persistent data for each NNL program Easier training methods Keyword to generate redundant

declarations Visual connection tool Include parameter choices High level semantics

Page 25: Neural Network Language NNL

Questions