ThanksUPDATED
As per comments by @michel.ht I tried a different driver. That helped but I am still getting formatting issues with the output. I am posting a specific example of a simple neural network. Perhaps I need to change the way that the code is written to better fit the Tikz driver?
\usepackage{tikz} \usetikzlibrary{shapes.multipart, positioning, decorations.markings, arrows.meta, calc, fit} \begin{tikzpicture}[shorten >=1pt,->,draw=black!50, node distance=\layersep] \tikzstyle{every pin edge}=[<-,shorten <=1pt] \tikzstyle{neuron}=[circle,fill=black!25,minimum size=25pt,inner sep=0pt] \tikzstyle{input neuron}=[neuron, fill=red!50]; \tikzstyle{output neuron}=[neuron, fill=orange!50]; \tikzstyle{hidden neuron}=[neuron, fill=green!50]; % Draw the input layer nodes \foreach \name / \y in {1,...,3} % This is the same as writing \foreach \name / \y in {1/1,2/2,3/3,4/4} \node[input neuron] (I-\name) at (0,-\y) {$x_{\y}$}; % Draw the output layer node \node[output neuron,pin={[pin edge={->}]right:$\hat{y}$}, right of=I-2] (O) {$\sigma$}; % Connect every node in the hidden layer with the output layer \foreach \source in {1,...,3} \path (I-\source) edge node[above]{$w_{\source}$} (O) ; \end{tikzpicture} Here is the corresponding picture. The text in the nodes is missing like $x_1$, etc.
There are some other issues with some tikz macros, but I can work on those in a subsequent post.
