Dark Blue with Orange - PowerPoint PPT Presentation

About This Presentation
Title:

Dark Blue with Orange

Description:

Stores size of each layer. Stores weight of each connection in order. Loading ... Optical character recognition. Shape recognition. Grocery store produce recognition ... – PowerPoint PPT presentation

Number of Views:31
Avg rating:3.0/5.0
Slides: 15
Provided by: tjh5
Learn more at: https://www.tjhsst.edu
Category:
Tags: blue | dark | grocery | orange | stores

less

Transcript and Presenter's Notes

Title: Dark Blue with Orange


1
Artificial Neural Networksfor Pattern Recognition
Jack Breese Computer Systems Quarter 3, Pd. 7
2
What is a Neural Network?
  • Interconnected neurons
  • Weights
  • Output

3
Uses of Neural Networks
  • Pattern Recognition
  • Face Recognition
  • OCR

4
Neurons
  • Add up each weighted input
  • Use an activation function to determine output
  • Pass on output to next layer

5
Training Neural Networks
  • Large input set
  • Outputs are verified, weights adjusted along a
    gradient based on these results.

6
Program Information
  • Neural Network Library written in C
  • Currently capable of initializing a two-layer
    perceptron with working, but unweighted
    connections.
  • Can load images up to 500x500 pixels in size.

7
Data Structure
typedef struct _connection float
weight struct _neuron from
connection typedef struct _neuron //TODO
Implement a neuron which supports
connections. float d connection
cons neuron neuron mkneuron(int c)
neuron n malloc(sizeof(neuron)) n-gtd
0 connection a malloc(csizeof(connection))
n-gtcons a return n
8
New Progress
  • Saving and Loading of Weights
  • New Data Structures
  • Optimization
  • Testing

9
Saving and Loading Weights
int saveWeights(char filename, neuron hidden,
neuron outputs, int insize, int hiddensize, int
outsize) FILE output output
fopen(filename, "wb") if(output
NULL) fprintf(stderr, "Error Unable to open
output file for writing.") exit(1) fprintf
(output, "d\n", insize) fprintf(output,
"d\n", hiddensize) fprintf(output, "d\n",
outsize) // fprintf(output, "s\n", "Hidden
Layer Weights") int i 0 int j 0 for(
j lt hiddensize j) for(i0 i lt insize
i) fprintf(output, "f\n",
hiddenj.consi.weight) // fprintf(outpu
t, "s\n", "Output Layer Weights") i 0 j
0 for( iltoutsize i) for(j0
jlthiddensize j) fprintf(output, "f\n",
outputsi.consj.weight) fprintf(output
, "s\n", "End") fclose(output) return 0
10
Saving and Loading, Cont.
  • File Format
  • Stores size of each layer
  • Stores weight of each connection in order
  • Loading
  • Just like saving, but backwards.

11
New Data Structures
  • A netsize struct
  • Contains three ints
  • Makes keeping track of the network size cleaner
  • typedef struct _netsize
  • int insize
  • int hiddensize
  • int outsize
  • netsize

12
Testing
  • Memory Usage was tested
  • See next slide.

13
Problems Encountered
  • Initially thought memory usage was low.
  • Forgot to reset counter in nested for loops to 0.
  • That was dumb.
  • Corrected problem, memory usage went up
  • Decided to scale back network size/interconnectedn
    ess

14
4th Quarter Goals
  • Perform simpler recognition tasks on smaller
    images due to memory/processor constraints
  • Simple face recognition
  • Optical character recognition
  • Shape recognition
  • Grocery store produce recognition
Write a Comment
User Comments (0)
About PowerShow.com