Artifical Neural Network MLP BP Lib

User contributed sources that have become inactive, deprecated, or generally unusable. But ... we don't really want to throw them away either.
mambazo
Posts: 652
Joined: Jul 17, 2005 13:02
Location: Ireland
Contact:

Artifical Neural Network MLP BP Lib

Post by mambazo »

This is a subsection of my college project work. The lib will be used to recognise real audio guitar chord signatures eventually, but heres a little demo to get your toes wet!

The lib is a single 6k .bi file and already it can do some pretty funky stuff!

Download Demo


Command List:

NCreateNetwork
NSetLayer
NBind
NLearn
NCalc
NSave
NLoad
Last edited by mambazo on Apr 03, 2006 19:41, edited 1 time in total.
coderJeff
Site Admin
Posts: 4326
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Post by coderJeff »

Fascinating stuff! I see that the NN is just taught letters. So when I selected `7' the NN returned `Z'. All things considered that's a good guess. It really felt like my computer was thinking. Great work.
counting_pine
Site Admin
Posts: 6323
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Post by counting_pine »

What's it supposed to do? When I run it, it just crashes after about 5000 iterations.
Sisophon2001
Posts: 1706
Joined: May 27, 2005 6:34
Location: Cambodia, Thailand, Lao, Ireland etc.
Contact:

Post by Sisophon2001 »

Hi:

I don’t have a compiler here, but I think you missed one out of bounds that I noted on an earlier version.

For i = 0 To 25
Next
Print i

will print 26, so the array sure(25) can go out of bounds on the last usage.

Compile with –exx to check the code is working.

Garvan
cha0s
Site Admin
Posts: 5319
Joined: May 27, 2005 6:42
Location: USA
Contact:

Post by cha0s »

out of bounds on line 172... and it took sooo long to do 5,000 iterations too /tear...
mambazo
Posts: 652
Joined: Jul 17, 2005 13:02
Location: Ireland
Contact:

Post by mambazo »

Thanks chaps. I'll upload the fix shortly. Thought I caught all those bound checks in the last view. I'll use -exx from here on :P lesson learned

EDIT: Updated the download.
cha0s
Site Admin
Posts: 5319
Joined: May 27, 2005 6:42
Location: USA
Contact:

Post by cha0s »

nice work =) don't want it crashing when you show it to your teacher ;p
voodooattack
Posts: 605
Joined: Feb 18, 2006 13:30
Location: Alexandria / Egypt
Contact:

Post by voodooattack »

Amazing work indeed..

I really like the network's design, but i think its a little bit slow.. somehow :)
I know its just a start, but you should concentrate on the speed as your primary target.

I'd suggest using single precision FP instead of double precision FP, this could definitely double the network speed (i've done that to your network and tested it) ;)

Code: Select all

Aborting due to runtime error 6 (out of bounds array access) at line: 203
I think you forgot to update the 25 in the last for loop (at line 195)

Keep up the good work :D

Best regards..
--voodoo
anonymous1337
Posts: 5494
Joined: Sep 12, 2005 20:06
Location: California

Post by anonymous1337 »

This is fricken amazing. I'm trying it out with all sorts of different settings. If you can continue to work on it, I'd love to see this grow :D
yetifoot
Posts: 1710
Joined: Sep 11, 2005 7:08
Location: England
Contact:

Post by yetifoot »

I like this. This is the first NN example that i've been able to modify successfully.

For me + and - cause a crash.
mambazo
Posts: 652
Joined: Jul 17, 2005 13:02
Location: Ireland
Contact:

Post by mambazo »

Thanks for the suggestions. I'll get to work right away and let you all know when there is an update!
yetifoot
Posts: 1710
Joined: Sep 11, 2005 7:08
Location: England
Contact:

Post by yetifoot »

I found this, it was causing the certainty to be wrong.

Code: Select all

PRINT "Certain: "; CSNG(5-sure(i))/5*100; " %"
Should be

Code: Select all

PRINT "Certain: "; CSNG(5-sure(isure))/5*100; " %"
mambazo
Posts: 652
Joined: Jul 17, 2005 13:02
Location: Ireland
Contact:

Post by mambazo »

good catch, i found that too :P

I've made some nice updates! NSave and NLoad now work fine. there is a pre taught network there now for you to load if you want.

Also, I've changed the learning algo a bit, now it learns WITH distortion, so it is very accurate right up to a 50% distorted input. *pats on back* ;)

The download above has been updated!
yetifoot
Posts: 1710
Joined: Sep 11, 2005 7:08
Location: England
Contact:

Post by yetifoot »

Can this type of network be used to make something like this?

http://www.20q.net/

Its the old classic 20 questions game.
mambazo
Posts: 652
Joined: Jul 17, 2005 13:02
Location: Ireland
Contact:

Post by mambazo »

Yes, it can :) Not sure exactly how you'd do it, but it is possible. Each question would influence one input of the network, or something.
Post Reply