I also can not figure out how to choose the right Loss function.
I have two neurons. They work independently and give values ​​from -1 to 1.
For example, one neuron gives 0.3, and the network gives the correct answer is -0.4. Network error is 0.7. I have to reduce the gradient. But if I call the L1Loss function, then I will get 0.3 - (- 0.4) = 0.7. In this case, my gradients will be increased. How do I specify a network to reduce the gradient?
Although maybe I’m wrong, the network will do everything right …
The first question remains, how do I calculate the gradients for two neurons( loss1.backward(), loss2.backward() )