JDMCreator / LaTeXTableEditor

readme
MIT License
143 stars 15 forks source link

couldnt load table #14

Closed pranavn91 closed 5 years ago

pranavn91 commented 5 years ago
\begin{table}[H]
  \caption{Different variants of graph neural networks. Extracted from \cite{wu2019comprehensive, zhou2018graph}} 
  \label{tab:variants}

  \centering
\resizebox{\textwidth}{110mm}{ %12可随机设置,调整到适合自己的大小为止
\begin{tabular}{p{2cm} | p{2cm} | l | l}
\hline
\begin{tabular}{c} \specialrule{0em}{2pt}{2pt} \textbf{Name}  \\  \specialrule{0em}{2pt}{2pt} \end{tabular} & \textbf{Variant} & \textbf{Aggregator} & \textbf{Updater}\\ \hline
%\begin{spacing}{1.3}
 & ChebNet  & \begin{tabular}{l}
\specialrule{0em}{2pt}{2pt}
$\mathbf{N}_k = \mathbf{T}_k(\tilde{\mathbf{L}}) \mathbf{X}$ \\ \specialrule{0em}{2pt}{2pt}
\end{tabular} &  \begin{tabular}{l} $\mathbf{H} = \sum_{k=0}^K  \mathbf{N}_k \mathbf{\Theta}_k$ \end{tabular} \\ \cline{2-4}
{Spectral Methods} & $1^{st}$-order model & \begin{tabular}{l}
\specialrule{0em}{2pt}{2pt}$\mathbf{N}_0 = \mathbf{X} $\\
$\mathbf{N}_1 = \mathbf{D}^{-\frac{1}{2}}\mathbf{A}\mathbf{D}^{-\frac{1}{2}}\mathbf{X} $\\
\end{tabular} & \begin{tabular}{l} $\mathbf{H} = \mathbf{N}_0\mathbf{\Theta}_0 + \mathbf{N}_1\mathbf{\Theta}_1$ \end{tabular} \\ \cline{2-4}
& Single parameter & \begin{tabular}{l}
\specialrule{0em}{2pt}{2pt}$\mathbf{N} = (\mathbf{I}_N + \mathbf{D}^{-\frac{1}{2}}\mathbf{A}\mathbf{D}^{-\frac{1}{2}})\mathbf{X}$
\end{tabular} & \begin{tabular}{l} $\mathbf{H} = \mathbf{N}\mathbf{\Theta}$ \end{tabular} \\ \cline{2-4}
& GCN & \begin{tabular}{l} 
\specialrule{0em}{2pt}{2pt} $\mathbf{N} = \tilde{\mathbf{D}}^{-\frac{1}{2}}\tilde{\mathbf{A}}\tilde{\mathbf{D}}^{-\frac{1}{2}}\mathbf{X}$ \\ \specialrule{0em}{2pt}{2pt} \end{tabular}  & \begin{tabular}{l} $\mathbf{H} = \mathbf{N} \mathbf{\Theta}$ \end{tabular} \\ \hline
%\end{spacing}

%\multirow{6}{*}
& Convolutional networks &
\begin{tabular}{l}
\specialrule{0em}{2pt}{2pt}$\mathbf{h}_{\mathcal{N}_v}^t = \mathbf{h}_v^{t-1} + \sum_{k=1}^{\mathcal{N}_v} \mathbf{h}_k^{t-1} $
\end{tabular} & 
\begin{tabular}{l}
$\mathbf{h}_v^t = \sigma ( \mathbf{h}_{\mathcal{N}_v}^t\mathbf{W}_L^{\mathcal{N}_v}) $ 
\end{tabular}  \\ \cline{2-4}
{Non-spectral Methods} & DCNN & \begin{tabular}{l}
\specialrule{0em}{2pt}{2pt}Node classification: \\
$\mathbf{N} = \mathbf{P}^* \mathbf{X} $\\ \specialrule{0em}{2pt}{2pt}
Graph classification: \\
$\mathbf{N} = 1_N^T\mathbf{P}^* \mathbf{X}/N $\\ \specialrule{0em}{2pt}{2pt}
\end{tabular} & 
\begin{tabular}{l}
$\mathbf{H} = f \left(\mathbf{W}^c \odot \mathbf{N} \right)$
\end{tabular}  \\ \cline{2-4}
& GraphSAGE & \begin{tabular}{l}
\specialrule{0em}{2pt}{2pt}$\mathbf{h}_{\mathcal{N}_v}^{t} = {\rm AGGREGATE}_{t}\left(\{\mathbf{h}_u^{t-1}, \forall u\in \mathcal{N}_v\}\right) $ \\ \specialrule{0em}{2pt}{2pt}
\end{tabular} & 
\begin{tabular}{l}
$\mathbf{h}_{v}^{t} = \sigma\left(\mathbf{W}^{t} \cdot [ \mathbf{h}_{v}^{t-1} \| \mathbf{h}_{\mathcal{N}_v}^{t} ] \right) $ \\
\end{tabular} \\ \hline

Graph Attention Networks & GAT & 
\begin{tabular}{l}
\specialrule{0em}{2pt}{2pt}$\alpha_{vk} = \frac{\exp\left(\text{LeakyReLU}\left(\mathbf{a}^T[{\mathbf{W}}\mathbf{h}_v\|\mathbf{W}\mathbf{h}_k]\right)\right)}{\sum_{j\in\mathcal{N}_v} \exp\left(\text{LeakyReLU}\left(\mathbf{a}^T[{\bf W}\mathbf{h}_v\|{\bf W}\mathbf{h}_j]\right)\right)} $\\
\specialrule{0em}{2pt}{2pt}$\mathbf{h}_{\mathcal{N}_v}^t = \sigma\left(\sum_{k\in\mathcal{N}_v} \alpha_{vk} {\bf W}\mathbf{h}_k\right)
$ \\
\specialrule{0em}{3pt}{3pt}Multi-head concatenation: \\
$\mathbf{h}_{\mathcal{N}_v}^t = \concat_{m=1}^M \sigma\left(\sum_{k\in\mathcal{N}_v}\alpha_{vk}^m{\bf W}^m\mathbf{h}_k\right) $ \\
\specialrule{0em}{3pt}{3pt} Multi-head average: \\
$\mathbf{h}_{\mathcal{N}_v}^t =  \sigma\left(\frac{1}{M}\sum_{m=1}^M \sum_{k\in\mathcal{N}_v}\alpha_{vk}^m{\bf W}^m\mathbf{h}_k\right) $
\\ \specialrule{0em}{2pt}{2pt}
\end{tabular}& 
\begin{tabular}{l}
$\mathbf{h}_v^t = \mathbf{h}_{\mathcal{N}_v}^t$ 
\end{tabular} \\ \hline

Gated Graph Neural Networks & GGNN & 
\begin{tabular}{l}
$\mathbf{h}_{\mathcal{N}_v}^t = \sum_{k \in \mathcal{N}_v} \mathbf{h}_k^{t-1} + \mathbf{b}$ 
\end{tabular} & 
\begin{tabular}{l}
\specialrule{0em}{2pt}{2pt}
$ \mathbf{z}_v^t = \sigma(\mathbf{W}^z\mathbf{h}_{\mathcal{N}_v}^t+\mathbf{U}^z{\mathbf{h}_v^{t-1}}) $\\
$ \mathbf{r}_v^t = \sigma(\mathbf{W}^r\mathbf{h}_{\mathcal{N}_v}^t+\mathbf{U}^r{\mathbf{h}_v^{t-1}}) $\\
$ \widetilde{\mathbf{h}_v^t} = \tanh(\mathbf{W}\mathbf{h}_{\mathcal{N}_v}^t+\mathbf{U}({\mathbf{r}_v^t}\odot{\mathbf{h}_v^{t-1}})) $\\
$ \mathbf{h}_v^t = (1-{\mathbf{z}_v^t}) \odot{\mathbf{h}_v^{t-1}}+{\mathbf{z}_v^t}\odot{\widetilde{\mathbf{h}_v^t}} $ \\
\specialrule{0em}{2pt}{2pt}
\end{tabular}  \\ \hline

%\multirow{13}{*}
 & Tree LSTM (Child sum) & \begin{tabular}{l}
$\mathbf{h}_{\mathcal{N}_v}^t = \sum_{k \in \mathcal{N}_v} \mathbf{h}_k^{t-1}$
\end{tabular}& 
\begin{tabular}{l}
\specialrule{0em}{2pt}{2pt}
$\mathbf{i}_v^{t} = \sigma ( \mathbf{W}^i \mathbf{x}_v^t + \mathbf{U}^i \mathbf{h}_{\mathcal{N}_v}^t + \mathbf{b}^i ) $\\
$\mathbf{f}_{vk}^t = \sigma \left( \mathbf{W}^f \mathbf{x}_v^t + \mathbf{U}^f \mathbf{h}_k^{t-1} + \mathbf{b}^f \right) $\\
$\mathbf{o}_v^{t} = \sigma ( \mathbf{W}^o \mathbf{x}_v^t + \mathbf{U}^o \mathbf{h}_{\mathcal{N}_v}^t + \mathbf{b}^o ) $\\
$\mathbf{u}_v^t = \tanh (\mathbf{W}^u \mathbf{x}_v^t + \mathbf{U}^u \mathbf{h}_{\mathcal{N}_v}^t + \mathbf{b}^u ) $\\
$\mathbf{c}_v^t = \mathbf{i}_v^t \odot \mathbf{u}_v^t + \sum_{k \in \mathcal{N}_v} \mathbf{f}_{vk}^t \odot \mathbf{c}_k^{t-1} $\\
$\mathbf{h}_v^t = \mathbf{o}_v^t \odot \tanh(\mathbf{c}_v^t) $\\
\specialrule{0em}{2pt}{2pt}
\end{tabular} 
 \\ \cline{2-4}

{Graph LSTM} & Tree LSTM (N-ary) & 
\begin{tabular}{l}
$\mathbf{h}_{\mathcal{N}_v}^{ti} = \sum_{l=1}^K \mathbf{U}_l^i \mathbf{h}_{vl}^{t-1} $\\
$\mathbf{h}_{\mathcal{N}_vk}^{tf} = \sum_{l=1}^K \mathbf{U}_{kl}^f \mathbf{h}_{vl}^{t-1} $\\
$ \mathbf{h}_{\mathcal{N}_v}^{to} =\sum_{l=1}^K \mathbf{U}_l^o \mathbf{h}_{vl}^{t-1} $\\
$ \mathbf{h}_{\mathcal{N}_v}^{tu} =\sum_{l=1}^K \mathbf{U}_l^u \mathbf{h}_{vl}^{t-1} $\\
\end{tabular} & 
\begin{tabular}{l}
\specialrule{0em}{2pt}{2pt} $\mathbf{i}_v^t = \sigma ( \mathbf{W}^i \mathbf{x}_v^t + \mathbf{h}_{\mathcal{N}_v}^{ti} + \mathbf{b}^i ) $\\
$\mathbf{f}_{vk}^t = \sigma ( \mathbf{W}^f \mathbf{x}_v^t + \mathbf{h}_{\mathcal{N}_vk}^{tf} + \mathbf{b}^f ) $\\
$\mathbf{o}_v^t = \sigma ( \mathbf{W}^o \mathbf{x}_v^t + \mathbf{h}_{\mathcal{N}_v}^{to} + \mathbf{b}^o ) $\\
$\mathbf{u}_v^t = \tanh ( \mathbf{W}^u \mathbf{x}_v^t + \mathbf{h}_{\mathcal{N}_v}^{tu} + \mathbf{b}^u ) $\\
$\mathbf{c}_v^t = \mathbf{i}_v^t \odot \mathbf{u}_v^t + \sum_{l=1}^K \mathbf{f}_{vl}^t \odot \mathbf{c}_{vl}^{t-1} $\\
$\mathbf{h}_v^t = \mathbf{o}_v^t \odot \tanh (\mathbf{c}_v^t)$ \\ \specialrule{0em}{2pt}{2pt}
\end{tabular} \\ \cline{2-4}

& Graph LSTM  & 
\begin{tabular}{l}
$\mathbf{h}_{\mathcal{N}_v}^{ti} = \sum_{k \in \mathcal{N}_v} \mathbf{U}_{m(v,k)}^i \mathbf{h}_k^{t-1} $\\
$ \mathbf{h}_{\mathcal{N}_v}^{to} = \sum_{k \in\mathcal{N}_v} \mathbf{U}_{m(v,k)}^o \mathbf{h}_{k}^{t-1} $\\
$ \mathbf{h}_{\mathcal{N}_v}^{tu} = \sum_{k \in \mathcal{N}_v} \mathbf{U}_{m(v,k)}^u \mathbf{h}_{k}^{t-1} $\\
\end{tabular} & 
\begin{tabular}{l}
\specialrule{0em}{2pt}{2pt}
  $\mathbf{i}_v^t = \sigma (\mathbf{W}^i \mathbf{x}_v^t + \mathbf{h}_{\mathcal{N}_v}^{ti} + \mathbf{b}^i ) $\\ 
  $\mathbf{f}_{vk}^t = \sigma (\mathbf{W}^f \mathbf{x}_v^t + \mathbf{U}_{m(v,k)}^f \mathbf{h}_k^{t-1} + \mathbf{b}^f ) $\\ 
  $\mathbf{o}_v^t = \sigma (\mathbf{W}^o \mathbf{x}_v^t + \mathbf{h}_{\mathcal{N}_v}^{to} + \mathbf{b}^o ) $\\ 
  $\mathbf{u}_v^t = \tanh (\mathbf{W}^u \mathbf{x}_v^t + \mathbf{h}_{\mathcal{N}_v}^{tu} + \mathbf{b}^u ) $\\ 
  $\mathbf{c}_v^t = \mathbf{i}_v^t \odot \mathbf{u}_v^t + 
  \sum_{k \in \mathcal{N}_v} \mathbf{f}_{vk}^t \odot \mathbf{c}_{k}^{t-1} $\\ 
  $\mathbf{h}_v^t = \mathbf{o}_v^t \odot \tanh(\mathbf{c}_v^t) $ \\
\specialrule{0em}{2pt}{2pt}
\end{tabular} \\ \hline
\end{tabular}
}

\end{table}
JDMCreator commented 5 years ago

I confirm this issue. I had trouble running your code sample in LaTeX. Here is the preambule I used :

\usepackage{amsmath,float,graphicx,booktabs}
\newcommand*\concat{\mathbin{\|}}
JDMCreator commented 5 years ago

I fixed the issue. I forgot to parse comments in tables, so it was in fact a major issue.