mirror of
https://github.com/NotXia/unibo-ai-notes.git
synced 2025-12-14 18:51:52 +01:00
Fix listing spacing
This commit is contained in:
@ -39,8 +39,7 @@
|
||||
showspaces = false,
|
||||
showstringspaces = true,
|
||||
showtabs = false,
|
||||
tabsize = 3,
|
||||
belowskip = -0.8\baselineskip
|
||||
tabsize = 3
|
||||
}
|
||||
\lstset{style=mystyle}
|
||||
\lstset{language=Python}
|
||||
|
||||
@ -106,7 +106,7 @@ Note: descent methods usually converge to a local minimum.
|
||||
|
||||
\item[Backtracking procedure] \marginnote{Backtracking procedure}
|
||||
$\alpha_k$ is chose such that it respects the Wolfe condition\footnote{\url{https://en.wikipedia.org/wiki/Wolfe_conditions}}:
|
||||
\begin{lstlisting}[mathescape=true]
|
||||
\begin{lstlisting}[mathescape=true, belowskip = -0.8\baselineskip]
|
||||
def backtracking($\tau$, $c_1$):
|
||||
$\alpha_k$ = 1 # Initial guess
|
||||
while $f(x_k - \alpha_k \nabla f(\vec{x}_k))$ > $f(\vec{x}_k)$ + $c_1 \alpha_k \nabla f(\vec{x}_k)^T \nabla f(\vec{x}_k)$:
|
||||
|
||||
Reference in New Issue
Block a user