\begin{figure}[h] \centering % Center the entire figure environment…
- User
\begin{figure}[h] \centering % Center the entire figure environment \begin{minipage}{0.4\textwidth} \begin{tikzpicture} \begin{axis}[ title={GELU Activation Function}, xlabel={}, xmin=-5, xmax=5, ymin=-1.2, ymax=1.2, legend pos=north west, ymajorgrids=true, grid style=dashed, ]
\addplot[ domain=-5:5, samples=100, color=blue, ] {x * 0.5 * (1 + tanh(sqrt(2/pi) * (x + 0.044715 * x^3)))}; \end{axis} \end{tikzpicture} \end{minipage} \hfill \begin{minipage}{0.4\textwidth} \begin{tikzpicture} \begin{axis}[ title={ELU Activation Function}, xlabel={}, xmin=-5, xmax=5, ymin=-1.2, ymax=5, legend pos=north west, ymajorgrids=true, grid style=dashed, ]
\addplot[ domain=-5:0, samples=100, color=red, ] {exp(x)-1}; \addplot[ domain=0:5, samples=100, color=red, ] {x};
\end{axis} \end{tikzpicture} \end{minipage} \caption{GELU and ELU activation functions} \end{figure}
center the figures in the page (they are moved to the right)
Assistant
- User
still not centered, maybe make the plots a bit smaller
Assistant