Backpropagation neural network

In summary, the problem is that the network is not able to approximate a function that is differentiable.
  • #1
a b
16
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
  • #2
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 :tongue:. The time is required to give it enough information to define them in terms of constants.
 
  • #3
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

  • neural_network.zip
    174.6 KB · Views: 239
Last edited:
  • #4
Thanks!
 
  • #5
for your interest in neural network programming! Backpropagation neural networks are a powerful tool for learning and solving complex problems. It sounds like you have successfully implemented a feedforward 3-layer network using the backpropagation algorithm to learn the task of "throwing a stone". Congratulations on your progress!

In regards to your second attempt at creating a network with only the distance parameter in input, it is likely that the network is facing a problem known as "overfitting". This occurs when the network becomes too specialized to the training data and is unable to generalize to new data. In this case, the network is only learning specific combinations of angle and speed that lead to the same distance, rather than understanding the overall relationship between the parameters.

To solve this problem, you could try using a larger and more diverse training dataset, or implementing techniques such as regularization to prevent overfitting. Another option could be to use a different type of neural network, such as a recurrent neural network or a convolutional neural network, which may be better suited for this type of problem.

Overall, neural network programming can be challenging but also very rewarding. I encourage you to continue learning and experimenting with different techniques to improve your network's performance. Good luck!
 

1. What is a backpropagation neural network?

A backpropagation neural network is a type of artificial neural network that uses an algorithm called backpropagation to train the network. It is a feedforward network, meaning that the information flows in one direction, from the input layer to the output layer. Backpropagation allows the network to adjust the weights of its connections based on the error between the actual output and the desired output, thus improving its performance over time.

2. How does backpropagation work?

Backpropagation works by calculating the error or difference between the actual output of the network and the desired output, and then propagating this error backwards through the network to adjust the weights of the connections. This process is repeated for each input in the training data, and over multiple iterations, the network learns to minimize the error and improve its performance.

3. What are the benefits of using backpropagation in neural networks?

Backpropagation allows neural networks to learn from training data and improve their performance over time. It also allows for the training of deep neural networks, which have multiple hidden layers, making them more powerful and capable of learning complex relationships between inputs and outputs. Additionally, backpropagation is a relatively simple algorithm, making it easy to implement and widely used in the field of machine learning.

4. Are there any limitations to backpropagation?

One limitation of backpropagation is that it requires a large amount of training data to effectively learn and generalize patterns. Without enough data, the network may overfit and not perform well on new, unseen data. Additionally, backpropagation can be slow to converge, especially in deep neural networks with many layers. Newer optimization techniques, such as stochastic gradient descent, have been developed to address these limitations.

5. What are some real-world applications of backpropagation neural networks?

Backpropagation neural networks have been successfully used in a variety of real-world applications, including image and speech recognition, natural language processing, and financial market prediction. They are also used in fields such as robotics, healthcare, and manufacturing for tasks such as object recognition, anomaly detection, and quality control. With advancements in technology and research, backpropagation neural networks are being applied to even more complex and diverse problems.

Similar threads

  • Programming and Computer Science
Replies
4
Views
644
  • Programming and Computer Science
Replies
18
Views
1K
  • Programming and Computer Science
2
Replies
50
Views
3K
  • Programming and Computer Science
Replies
1
Views
926
  • Programming and Computer Science
Replies
2
Views
159
  • Programming and Computer Science
Replies
1
Views
826
  • Programming and Computer Science
Replies
9
Views
1K
  • Programming and Computer Science
Replies
3
Views
997
  • Programming and Computer Science
Replies
4
Views
1K
  • Programming and Computer Science
Replies
1
Views
919
Back
Top