撰寫論文時,表格是很好的工具去對比實驗結果。這篇博文介紹的表格 包含了幾種不同的框格以及註釋,可以修成自己需要的形式。
表1.
\begin{table}[!hbp]%開始表格
%其中參數[!hbp] 的意思是:
%!表示儘可能的嘗試 h(here) 當前位置顯示錶格,
%如果實在不行顯示在 b(bottom) 底部,
\begin{tabular}{|c|c|c|c|c|}%開始繪製表格
%{|c|c|c|c|c|} 表示會有5列, 每個的方式未居中(c),
%也可以改成靠左(l)和靠右(r) 其中 | 表示繪製列線
\hline %繪製一條水平的線
\hline %再繪製一條水平的線
lable 1-1 & label 1-2 & label 1-3 & label 1 -4 & label 1-5
%這事表格的第一行, 其中5個元素, 用 &隔開.
\hline
label 2-1 & label 2-2 & label 3-3 & label 4-4 & label 5-5 \\
%這事表格的第二行, 其中5個元素, 用 & 隔開.
\hline
%下面這一段有點複雜,參加後面的解釋,可以自己修改慢慢體會.
\multirow{2}{*}{Multi-Row} & \multicolumn{2}{|c|}{Multi-Column} & \multicolumn{2}{|c|}{\multirow{2}{*}{Multi-Row and Col}} \\
%上面開始兩行合併, 然後又是正常的兩列合併, 接下來是兩行兩列合併
\cline{2-3} %繪製第2列和第3列的橫線
& column-1 & column-2 & \multicolumn{2}{|c|}{}\\
%補償上面的兩列合併的那一行
\hline
\end{tabular}
\caption{My first table} %表格的名稱
\end{table}
表2.
\begin{table}
\centering
\caption{layer parameters. The output dimension is given by (height $\times$ width $\times$ depth). The output dimension is given by (height × width × depth). PS: patch size for convolution and pooling layers; S: stride. GAP: globle average pooling. MX: max pooling.}
\begin{tabular}{lllll}
\hline
Name & Type & Output Dim & PS & S\\
\noalign{\global\arrayrulewidth1pt}\hline\noalign{\global\arrayrulewidth0.4pt}
\multicolumn{5}{c}
{\textbf{Feature net}}\\
Conv1 & Convolution & 62$\times$62$\times$64 & 3 $\times$ 3 & 1\\
Pooling1\_se & GAP & 1$\times$1$\times$64 &- &-\\
Ips1\_se & InnerProduct & 4 &- &-\\
Ips2\_se & InnerProduct & 64 &- &-\\
Conv2 & Convolution & 60$\times$60$\times$64 & 3 $\times$ 3 & 1\\
Conv3 & Convolution & 58$\times$58$\times$64 & 3 $\times$ 3 & 1\\
Conv4 & Convolution & 56$\times$56$\times$64 & 3 $\times$ 3 & 1\\
Conv5 & Convolution & 54$\times$54$\times$64 & 3 $\times$ 3 & 1\\
Pool1 & MP & 27$\times$27$\times$64 &2 $\times$ 2 &2\\
Ips1 & InnerProduct & 500 &- &-\\
\hline
\multicolumn{5}{c}
{\textbf{Metric net}}\\
Ips2 & InnerProduct & 10 &- &-\\
Ips3 & InnerProduct & 2 &- &-\\
\hline
\end{tabular}
\end{table}