I am typing an algorithm using the following preamble

\algnewcommand{\LeftComment}[1]{\(\triangleright\) #1}%

The whole algorithm has a indentation to the left as shown in the image below. How can I remove this indent?

enter image description here

This is the algorithm code

  \caption{Projected SGD for Model A, Batch Size=1}\label{alg:tellmain}
    \State Given: $\cF, \cFc$. Hyperparameters: $\alpha, \eta, \rS$.
    \For{each fact $f' \in \cF$}
    \State Mark $f'$ as seen.
    \For{$\rS$ steps}
    \State Sample $\fc = (\bar{t}, \bar{r})$ from $\cFc$.
    \State Set $f = f'$ with $p=0.5$,
    \State $\qquad$or sample $f$ from seen facts.
    \State Let $\vvv = \sigma(\ip{\rc}{\tc} - \ip{\r}{\t})$.
    \State \LeftComment{Fix $\e$ and optimize ${J}$}.
    \State {\small $\grad{\r}{\Jr} = {-\t}\vvv, \ \grad{\rc}{\Jr} = {\tc}\vvv$}
  \State {\small$ (\r; \rc) = \proj((\r; \rc) - \eta ((\grad{\r}{\Jr}; \grad{\rc}{\Jr}) + 2\alpha (\r; \rc)))$}
    \State \LeftComment{Fix $\r$ and optimize ${J}$}
    \State {\small$\grad{\t}{\Je} = {-\r}\vvv, \ \grad{\tc}{\Je} = {\rc_1}\vvv$}
    \State {\small $(\t; \tc) = \proj((\t; \tc) - \eta ((\grad{\t}{\Jr}; \grad{\tc}{\Jr}) + 2\alpha (\t; \tc)))$}

I am not sure there is an easy way. Here is a hack:



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.