algorithm2e comment style
You need to define a command with an argument giving the font specification and then use the name of this command in the argument for \SetCommentSty
:
\documentclass{article}
\usepackage{xcolor}
\usepackage[linesnumbered,ruled,vlined]{algorithm2e}
\newcommand\mycommfont[1]{\footnotesize\ttfamily\textcolor{blue}{#1}}
\SetCommentSty{mycommfont}
\begin{document}
\begin{algorithm}[H]
\DontPrintSemicolon
\KwData{Training set $x$}
$\Delta_{ji}^l := 0$ \tcp*{will be used to compute $\partial x$}
\tcc{iterate over all training examples}
\caption{Example code}
\end{algorithm}
\end{document}