Why Did My Neural Network Fail with Single Input Parameter?

  • Thread starter Thread starter a b
  • Start date Start date
  • Tags Tags
    Network Neural
AI Thread Summary
The discussion centers on the challenges faced by a beginner in neural network programming, specifically when implementing a feedforward neural network in C++. The user successfully trained a network to predict shooting angles and speeds based on input parameters of time of flight and distance, achieving satisfactory results. However, when attempting to create a second network that only uses distance as input, the user encountered significant accuracy issues. The primary concern identified is that multiple combinations of angle and speed can yield the same distance, leading to confusion for the network. It is suggested that the lack of additional input parameters, such as time, limits the network's ability to accurately determine the outputs. Theoretical limitations of neural networks in approximating functions are also discussed, emphasizing the need for sufficient input information to define the outputs clearly. Additionally, the user shared code and an executable file for others to review, noting potential compatibility with Windows XP systems.
a b
Messages
14
Reaction score
0
Hello,
I'm interested in neural network programming but I am a beginner.
Recently I wrote an example in C++ that I found in a book. It was a feedforward 3 layers network that learns the examples with the backpropagation algorithm. The aim of the network was to learn to "throw a stone": I taught it with some hundred numerical examples of shooting angles and speeds in output (calculated with the physics formulas) and time of flight and distance reached in input, repeated for some tens of thousands of epochs. After that, I ran the network: by putting distance and time of flight in input I obtained relatively good values of angle and speed in output (when tested, they lead to values of distance and time very near to those in input).
But then I tried to make another network with only the distance parameter in input, and I taught the net again with other examples (randomly chosen ). This try failed: I couldn't go beyond a very poor level of accuracy.
I have a faint idea of what the problem can be:I think the main issue is that there are many possible combinations of angle and speed that lead to the same distance, and maybe the network gets "confused". Maybe I simply made some mistake. Any explanation? How can I solve the problem? Do I need another kind of neural network?
Thank you
 
Last edited:
Technology news on Phys.org
It's not working because neural networks are theoretically limited to approximating differentiable functions. The problem is that f(d) doesn't give enough information to define both the angle and speed in constant terms; it defines them in terms of each other. For example 30deg at 1mph would be the same as 60deg s, where s is some number I don't feel like solving for :-p. The time is required to give it enough information to define them in terms of constants.
 
Here is the code you asked for, there is also a readme.txt file with some instructions and the executable file for windows. I hope it will be useful.
I'm not 100% sure that the executable file can run on any Windows computer, anyway I think it has a good probability to run on any Windows XP system, if I correctly linked all the libraries needed.
 

Attachments

Last edited:
Thanks!
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Thread 'Project Documentation'
Trying to package up a small bank account manager project that I have been tempering on for a while. One that is certainly worth something to me. Although I have created methods to whip up quick documents with all fields and properties. I would like something better to reference in order to express the mechanical functions. It is unclear to me about any standardized format for code documentation that exists. I have tried object orientated diagrams with shapes to try and express the...
Back
Top