:</p><pre><span class='va'>scale</span> <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/diag.html'>diag</a></span><span class='op'>(</span><span class='va'>scale_diag</span> <span class='op'>+</span> <span class='va'>scale_identity_multiplier</span> <span class='op'>*</span> <span class='fu'>ones</span><span class='op'>(</span><span class='va'>k</span><span class='op'>)</span><span class='op'>)</span>
</pre>

<p>where:</p><ul>
<li><p><code>scale_diag.shape = [k]</code>, and,</p></