mirror of
https://github.com/NotXia/unibo-ai-notes.git
synced 2025-12-15 19:12:22 +01:00
Fix listing spacing
This commit is contained in:
@ -39,8 +39,7 @@
|
|||||||
showspaces = false,
|
showspaces = false,
|
||||||
showstringspaces = true,
|
showstringspaces = true,
|
||||||
showtabs = false,
|
showtabs = false,
|
||||||
tabsize = 3,
|
tabsize = 3
|
||||||
belowskip = -0.8\baselineskip
|
|
||||||
}
|
}
|
||||||
\lstset{style=mystyle}
|
\lstset{style=mystyle}
|
||||||
\lstset{language=Python}
|
\lstset{language=Python}
|
||||||
|
|||||||
@ -106,7 +106,7 @@ Note: descent methods usually converge to a local minimum.
|
|||||||
|
|
||||||
\item[Backtracking procedure] \marginnote{Backtracking procedure}
|
\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}}:
|
$\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$):
|
def backtracking($\tau$, $c_1$):
|
||||||
$\alpha_k$ = 1 # Initial guess
|
$\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)$:
|
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