-1

I am stuck on how to do this completely.

I have the following picture which I need to do using Latex. I need to put the following picture in my assignment.

One way I know it can be done is putting this picture in a folder and then using \includegraphics but that is not allowed and picture is not looking good too.

Is there any way I can draw this picture in my assignment without having to use \includegraphics.

If someone could kindly help me to draw this picture, I will be indeed really grateful

Here is the picture:

enter image description here

Zarko
  • 296,517
Charlotte
  • 963
  • I suggest you look at TikZ, a graphics package for TeX: https://ctan.org/pkg/pgf?lang=en – Benjamin McKay Apr 24 '20 at 08:24
  • A question from yesterday https://tex.stackexchange.com/questions/540287/tikz-randomly-drop-connections-in-neural-network I believe this is a pretty good starting point. By the way, the title of your question doesn't mean much... – BambOo Apr 24 '20 at 08:25
  • 1
    For starting point see https://tex.stackexchange.com/questions/365404/tikz-neural-network-draw-notation. – Zarko Apr 24 '20 at 08:26

1 Answers1

1

This question has already been asked in several variations, I think. Here is one more answer.

\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{positioning,matrix}
\begin{document}
\begin{tikzpicture}[Dotted/.style={% https://tex.stackexchange.com/a/52856/194703
    line width=1.2pt,
    dash pattern=on 0.01\pgflinewidth off #1\pgflinewidth,line cap=round,
    shorten >=0.3em,shorten <=0.3em},
    Dotted/.default=5]
 \matrix[matrix of math nodes,nodes={circle,draw,minimum size=1.5em},
    column sep=2em,row sep=1ex](mat) {
    C_1 & D_1 \\
    C_2 & D_2 \\[2em]
    C_m & D_n \\
 };
 \draw[Dotted] (mat-2-1) -- (mat-3-1);
 \draw[Dotted] (mat-2-2) -- (mat-3-2);
 \foreach \X in {1,2,3}
 {\foreach \Y in {1,2,3}
 {\draw (mat-\X-1) -- (mat-\Y-2);}}
 \matrix[matrix of math nodes,nodes={circle,draw,minimum size=1.5em},
    column sep=1em,below=2em of mat,xshift=2em,
    column 2/.style={column sep=2.5em}](mat2) {
    E_1 & E_2 & E_p\\
 };
 \draw[Dotted] (mat2-1-2) -- (mat2-1-3);
\end{tikzpicture}
\end{document}

enter image description here

  • Nice, but it doesn't look hand drawn. – Benjamin McKay Apr 24 '20 at 08:34
  • 1
    @BenjaminMcKay I only have paws, so I cannot hand draw things. –  Apr 24 '20 at 08:37
  • Thanks a lot, sir, It is really very helpful – Charlotte Apr 24 '20 at 08:43
  • Also, one more question, in the left side i want $3$ dots and in the right side i want $5$ dots. is it possible to increase the number of dots on the right? – Charlotte Apr 24 '20 at 08:59
  • 1
    @Math_Freak I do not understand this request and this is also not the purpose of this site to provide a hot line for additional requests. I believe to have answered the original question. At the very least you have a starting point for a follow-up regular question, not in the comments. –  Apr 24 '20 at 09:11