Advertisement

ANN error rate stuck at 0.5

Started by July 25, 2017 04:30 PM
8 comments, last by sjhalayka 7 years, 4 months ago

I'm trying to train a network to classify images, and the error rate gets stuck at 0.5. Am I doing something wrong? The code is posted below (Github).

You're kind of on the wrong forum for neural network questions. This is for game AI, not for general purpose AI algorithms.

Also, few people are going to want to dig through that much of someone else's code, especially given that there are barely any comments in there and a lot of code that is probably irrelevant (e.g. the file loader). What have you done so far to try and solve the problem? Does the error rate ever decrease at all? What does NNet.BackPropagate return? Why not try on just 1 image to begin with? Where is the actual classification taking place?

Advertisement

Thanks for replying.

If it makes any difference, this is a learning exercise for me, so that I can progress into teaching an artificial neural network how to play Texas Hold 'Em poker.

If I train it to classify only one image, it learns the correct output in 2 training sessions. When I train it to classify two images, the error rate gets stuck at 0.25 no matter how many training sessions.

 

 

 

  1. Your account of the problem is inconsistent. Is the error rate 0.5 or 0.25 or some other number? This is a red flag to me.
  2. You haven't posted any actual ANN code, which makes me guess that you're using a library. Have you contacted the library provider and/or consulted the library's documentation and example code?
  3. You didn't answer the single most important question from Kylotan, which is: what have you done to try to figure this out yourself?
  4. Do you know how to use a debugger? If so, have you tried stepping through the code to understand it better? If not, that's your starting point.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

I am using my own library, which works fine for solving for the XOR operator (https://github.com/sjhalayka/ann_xor).

I put the image classification source on https://github.com/sjhalayka/tgatest

I will try using a debugger, thanks for the guidance.

I'll pay the person who discovers the bug in my code. I use PayPal.

Advertisement

So I set the learning rate to be 0.1 (was 1.0), and set the back propagation function to use the mean squared error, and now it works.

And now you get to pay yourself. That's how programming works.

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

OK, thanks for the tip.

This topic is closed to new replies.

Advertisement