<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Feb 25, 2020, at 11:21 AM, Sajid Ali <<a href="mailto:sajidsyed2021@u.northwestern.edu" class="">sajidsyed2021@u.northwestern.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">Hi Hong, <br class="">
<br class="">
</div>
<div class="">Thanks for the explanation! <br class="">
<br class="">
</div>
<div class="">If I have a cost function consisting of an L2 norm of the difference of a TS-solution and some reference along with some constraints (say bounds, L1-sparsity, total variation etc), would I provide a routine for gradient evaluation of only the
 L2 norm (where TAO would take care of the constraints) or do I also have to take the constraints into account (since I'd also have to differentiate the regularizers) ?
<br class="">
</div>
</div>
</div>
</div>
</blockquote>
<div><br class="">
</div>
<div>This depends on how you would like to formulate and solve your optimization problem. If you wan to use the built-in regularizers in TAO, then you just need provide gradient evaluation of the L2 norm. But TAO provides interfaces for users to provide customized
 regularizers and the gradient of them, in this case, again, adjoint can be used for the gradient calculation in the same way you handle objective functions/gradients. Of course, it is also possible to include regularizers in your objective function.</div>
<div><br class="">
</div>
<div>Hong </div>
<div><br class="">
</div>
<blockquote type="cite" class="">
<div class="">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class=""><br clear="all" class="">
</div>
</div>
Thank You, <br class="">
<div class="">
<div dir="ltr" class="gmail_signature">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div style="font-size:12.8px" class="">Sajid Ali | PhD Candidate<br class="">
</div>
<div style="font-size:12.8px" class="">Applied Physics<br class="">
</div>
<div style="font-size:12.8px" class="">Northwestern University</div>
<div style="font-size:12.8px" class=""><a href="http://s-sajid-ali.github.io/" target="_blank" class="">s-sajid-ali.github.io</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</body>
</html>