I want to remove the starting 'heads' from the dotted arrows I drew from coordinates to nodes. With to
instead of edge
they dont appear but I cant get them dotted. Any ideas?
\documentclass[tikz,border=2mm]{standalone}
\newcommand{\mym}{\mkern-1.5mu-\mkern-3mu 1} % small minus for subscripts
\begin{document}
\begin{tikzpicture}
[ cnode/.style={draw=black,fill=#1,minimum width=3mm,circle},
]
% draw 3 timesteps
\foreach \x in {1,...,3}
{
% nodes input hidden and output
\node[cnode=blue,label=180:$ x_{\x}$] (x-\x) at ({3.3*\x-div(\x,4)},0) {};
\node[cnode=gray,label=90:$ v^{(1)}_{\x}$] (p-\x) at ({3.3*\x-div(\x,4)},2) {};
\node[cnode=orange,label=90:$ r^{(1)}_{\x}$] (q-\x) at ({3.3*\x-div(\x,4)},4) {};
\node[cnode=gray,label=90:$ v^{(2)}_{\x}$] (r-\x) at ({3.3*\x-div(\x,4)},6) {};
\node[cnode=orange,label=90:$~~r^{(n\mym)}_{\x}$] (h-\x) at ({3.3*\x-div(\x,4)},8) {};
\node[cnode=gray,label=90:$ v^{(n\mym)}_{\x}~$] (g-\x) at ({3.3*\x-div(\x,4)},10) {};
\node[cnode=red, label=90:$ x^{(n)}_{\x}$] (s-\x) at ({3.3*\x-div(\x,4)},13) {};
% cords for nowhere arrows
\coordinate[left of=r-\x] (n-\x);
\coordinate[right of=h-\x] (m-\x);
\draw [->](q-\x) edge [dotted, bend left=30] (n-\x);
\draw [->](m-\x) edge [dotted, bend right=30] (g-\x);
% draw weights
\draw [->](x-\x) to [bend right=45] node[right,pos=0.6] {$ \omega_v^{(1)}$} (p-\x);
\draw [->](x-\x) to [bend left=45] node[left,pos=0.7] {$ \omega_r^{(1)}$} (q-\x);
\draw [->](p-\x) to [bend right=45] node[right,pos=0.75] {$ \omega_v^{(2)}$} (r-\x);
\draw [->](h-\x) to [bend left=45] node[left,pos=0.7] {$ \omega_r^{(n)}$} (s-\x);
\draw [->](g-\x) to [bend right=45] node[right,pos=0.7] {$ \omega_v^{(n)}$} (s-\x);
\node at ({3.3*\x-div(\x,4)},7.4) {$\vdots$};
}
% add last input \tau
\node[cnode=blue,label=180:$ x_{\tau}$] (x-4) at (14,0) {};
\node[cnode=gray,label=90:$ v^{(1)}_{\tau}$] (p-4) at (14,2) {};
\node[cnode=orange,label=90:$ r^{(1)}_{\tau}$] (q-4) at (14,4) {};
\node[cnode=gray,label=90:$ v^{(2)}_{\tau}$] (r-4) at (14,6) {};
\node[cnode=orange,label=90:$~~r^{(n\mym)}_{\tau}$] (h-4) at (14,8) {};
\node[cnode=gray,label=90:$ v^{(n\mym)}_{\tau}~$] (g-4) at (14,10) {};
\node[cnode=red, label=90:$ x^{(n)}_{\tau}$] (s-4) at (14,13) {};
\draw [->](x-4) to [bend right=45] node[right,pos=0.6] {$ \omega_v^{(1)}$} (p-4);
\draw [->](x-4) to [bend left=45] node[left,pos=0.7] {$ \omega_r^{(1)}$} (q-4);
\draw [->](p-4) to [bend right=45] node[right,pos=0.75] {$ \omega_v^{(2)}$} (r-4);
\draw [->](h-4) to [bend left=45] node[left,pos=0.7] {$ \omega_r^{(n)}$} (s-4);
\draw [->](g-4) to [bend right=45] node[right,pos=0.7] {$ \omega_v^{(n)}$} (s-4);
\node at (12,2) {$\cdots$};
\node at (12,4) {$\cdots$};
\node at (12,6) {$\cdots$};
\node at (12,8) {$\cdots$};
\node at (12,10) {$\cdots$};
\node at (14,7.4) {$\vdots$};
% draw recurrent weights
\foreach[evaluate=\x as \xnext using int(\x+1)] \x in {1,2}
{
\draw [->](p-\x) -- node[above,pos=0.4] {$ \nu_v^{(1)}$} (p-\xnext);
\draw [<-](q-\x) -- node[above,pos=0.55] {$ \nu_r^{(1)}$} (q-\xnext);
\draw [->](r-\x) -- node[above,pos=0.4] {$ \nu_v^{(2)}$} (r-\xnext);
\draw [->](h-\x) -- node[above,pos=0.55] {$ \nu_r^{(n\mym)}$} (h-\xnext);
\draw [<-](g-\x) -- node[above,pos=0.4] {$ \nu_v^{(n\mym)}$} (g-\xnext);
}
% dotted arrows for last timestep
\coordinate[left of=r-4] (n-4);
\coordinate[right of=h-4] (m-4);
\draw [->](q-4) edge [dotted, bend left=30] (n-4);
\draw [->](m-4) edge [dotted, bend right=30] (g-4);
\end{tikzpicture}
\end{document}
EDIT: Additional Question: how to move the starting points of those arrows slightly upwards or downwards?
With @SchrödingersCat s Hint that was possible by using two coordinates for each starting point like this:
\coordinate[left= 0.8 of r-\x] (N-\x);
\coordinate[right= 0.8 of h-\x] (M-\x);
\coordinate[above= 0.3 of N-\x] (n-\x);
\coordinate[below= 0.3 of M-\x] (m-\x);
\draw (q-\x) edge [dotted, bend left=30, ->] (n-\x);
\draw (m-\x) edge [dotted, bend right=30, ->] (g-\x);
\draw q-4) edge [dotted, bend left=30,->] (n-4);
instead of\draw [->](q-4) edge [dotted, bend left=30] (n-4);
. Explanation: an edge starts a new path so technically you draw two paths, hence the excess arrow hear. Alternatively you can say\draw [dotted, ->](q-4) to[bend left=30] (n-4);
.