N
N
Nikita2022-02-22 21:39:44
Neural networks
Nikita, 2022-02-22 21:39:44

Is it possible to use modulo instead of squaring in the cost function?

I study neural networks, I decided to write from scratch a solution to the problem of recognizing numbers in C ++ without using third-party libraries (for a better understanding of the principle of neural networks). Reached the cost function. Almost all manuals say that you need to calculate the sum of the squared deviations and find such weights and thresholds that the sum is minimal.

So, question. Squaring is a rather complicated operation, at least much more complicated than a module. Can modulo be used instead of squaring for optimization purposes?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rPman, 2022-02-22
@gth-other

it is possible, but it may work worse , it all depends on the data and the task, probably it will only be possible to understand experimentally

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question