答案1
只是为了好玩(15 分钟后)我希望这个 MWE 与您的图相同(没有符号错误).....
%% Compile and read me!
\documentclass[a4paper,12pt]{article}
\usepackage{amsmath}
\usepackage{algpseudocode}
\usepackage{algorithm}
\begin{document}
\begin{algorithm}
\caption{Gradient Descent}
\begin{algorithmic}[1]
\Procedure{Gradient Descent}{$\{(\mathbf{X}_i,Y_i)\}_{i\in \text{train}},Ep,\eta,\lambda,\alpha,\mathbf{w}_0$}
\State $\mathbf{w}\leftarrow \mathbf{w}_0.$
\For{$i \in\{1,\ldots Ep\}$}
\State $\mathbf{w}\leftarrow \mathbf{w}-\eta(\nabla_{\mathbf{w}}MSE(c_{\mathbf{w}})+\lambda\mathbf{w})+\alpha\Delta(\mathbf{w}).$
\EndFor
\State{\textbf{Return} \textbf{w}.}
\EndProcedure
\end{algorithmic}
\end{algorithm}
\end{document}