0
$\begingroup$

Let us assume that there is a feedforward neural network with two layers. and weights of each layer are constrained such that sum of the weights is a constant value in each layer and their values are non-negative. You may wonder why should we have such assumptions? Answer: I have an optimization problem with unknown variables that can be mapped to a neural network in that weights represent my variables that's why. Can anyone suggest to me a way to handle these constraints? for now, I just integrated these constraints into the cost function, though the way I did is not working very well. I just added the constraints to the main cost function using max. for example when A(x)<x I just added its cost as max(A(x)/x-1,0) to the main cost function.

$\endgroup$

1 Answer 1

0
$\begingroup$

Maybe instead of mapping nn weights Wi to your problem, map Constant * Softmax(Wi) instead for each layer?

$\endgroup$
1
  • $\begingroup$ can you explain what you mean? because this is applied to the outputs, not to bare weights. $\endgroup$ Jul 4, 2022 at 17:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.