What’s the proper way to do constrained optimization in PyTorch?
For example, I want each parameter of my model to be bounded both from above and below by some constants cLow and cHigh.
That is, if W is the d-dimensional (flattened) weight vector of my model, I’d like to enforce
cLow < W[i] < cHigh for i = 1, 2, … d. How can I do that?