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!
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top