r/deeplearning • • 28d ago

Neural Net Learning problem

I had created a neural network system from scratch in

C++, and tested it like linear regression problem and it learned that number, and minimised the error.

But when I went to implement Number recognition, after learning of neurons it is just showing me the last number that it learned for any set of inputs although number are picked at random.

I don't think this problem is especially related to neural network, it could be me, who somewhere messed up the code.

If someone have tried this and got the same problem, could they explain me.

If nobody have ever got this problem then it's my code fault.

1 Upvotes

15 comments sorted by

1

u/LawAdventurous2383 26d ago

problem Solved...

it worked out, i just tweak the RELU function to be minimum of 0.001f, Increase the Learning Rate and Increase the Number of Training Set, though i used it keggel, its not accurate, but problem was solved,

problem was -> RELU and very small learning rate, after that i got the hint of working different number for different output, soo i increase output got more accurate.

thanks..

1

u/theHumbleGuy_06 28d ago

R u using an ann?

1

u/LawAdventurous2383 27d ago

What's that?

1

u/theHumbleGuy_06 27d ago

Short for artificial neural network, should have asked if ur neural network is an MLP or CNN? Which one is urs

1

u/LawAdventurous2383 27d ago

It's MLP for sure

1

u/theHumbleGuy_06 27d ago

Can u share the output screen?

1

u/LawAdventurous2383 26d ago

it worked out, i just tweak the RELU function to be minimum of 0.001f, Increase the Learning Rate and Increase the Number of Training Set, though i used it keggel, its not accurate, but problem was solved,

problem was -> RELU and very small learning rate, after that i got the hint of working different number for different output, soo i increase output got more accurate.

thanks..

1

u/theHumbleGuy_06 26d ago

That's really nice, plus u figured things out on ur own, that's more pride u should carry

1

u/Antenwww 28d ago

How many outputs does your final layer have ? Maybe you do not have 10 outputs for 10 numbers. For example If you have just one output it checks for only if a number is that number. Like is it 7 or not. Like a yes no question.

If you have this error. Make 10 ouputs each will need to add up to 100% total and the highest rated one is the number your network thinks your input is. Expecting an output range of 0-9 and having only 1 output is difficult

1

u/LawAdventurous2383 27d ago edited 27d ago

As I remembered, I had created 10 output, the hypothesis is a maxargs which would go from index output first to last and give me the index number of the highest probability, it's uses softmax activation function sooo, sum is always 1 or say 100 percent.

My input is a 27*27 one dimension array something.

Hidden layer is 128 one dimension array and there are 2 of it connecting each other

Lastly output is 10 one dimension array

1

u/Antenwww 27d ago

So there is nothing wrong with neural network side. Can you isolate neurons maybe to see if there is something wrong with convolutions or maybe neuron memory is not flushing between test inputs

2

u/LawAdventurous2383 27d ago

Actually yeah they are already seprated, each neuron is a object, i think it's more likely to be a faulty code rather then problem related to neural net. I will test your suggested tests to see where is the problem is, Thanks for reply

0

u/[deleted] 28d ago

[removed] — view removed comment

1

u/LawAdventurous2383 28d ago

Are you sure you wanna see that spooky scary code, maybe you could find out the problem in this, https://github.com/iampokebro/Iampokebro.git