99网
您的当前位置:首页【留档】一个好看的latex表格

【留档】一个好看的latex表格

来源:99网

latex

\begin{table*}
    \caption{Acceleration}
    \label{tab_acceleration}
    \begin{tabular}{cccc}
      \toprule
      Computation Backend & Hardware Platform & Time Per Step  &  Acceleration Factor\\ 
      \midrule
      CPU &  Intel Xeon Gold 5218R, 2x20 Cores, 80 Threads & 2.06 &   - \\ 
      CPU & AMD EPYC 7713, 2x Cores, 256 Threads & 0.440 & 4.68 \\
      Vulkan & Nvidia GeForce RTX 3090 & 0.111 & 18.6 \\
      CUDA & Nvidia GeForce RTX 3090 & 0.0477 & 43.2 \\
      Vulkan & Nvidia A100 Tensor Core GPU & 0.101 & 20.4\\
      CUDA & Nvidia A100 Tensor Core GPU & 0.0401 & 51.4\\
      \bottomrule
    \end{tabular}
\end{table*}

效果:

使用AdjustBox

\usepackage{adjustbox}

有效解决超出页边距的问题

\begin{table*}
    \centering
    \caption*{Table 1: Configurations}
    \label{tab_acceleration}
    \begin{adjustbox}{width=\textwidth,center}
        \begin{tabular}{cccc}
        \toprule
        Model & Learning rate & Num-layers  &  Embedding/Hidden-dim \\ 
        \midrule
        LSTM-LM & 0.001 & 3 &  256/512 \\ 
        LSTM-Seq2Seq & 0.001  & 3 & 256 \\
        Transformer-LM & 0.001 & 3 & 256  \\
        Transformer-Seq2Seq & 0.001 & 3 & 256 \\
        \bottomrule
        \end{tabular}
    \end{adjustbox}
\end{table*}

因篇幅问题不能全部显示,请点此查看更多更全内容