I've places two tables side by side, but I can't get the labels right.
\begin{table}[ht]
\begin{minipage}[b]{0.45\linewidth}\centering
\begin{tabular} {l | l | l}
a & a & a
\end{tabular}
\label{tab:NotreDame}
\caption{Training on Yosemite dataset and testing on Notre-Dame dataset}
\end{minipage}
\hspace{0.5cm}
\begin{minipage}[b]{0.45\linewidth}
\centering
\begin{tabular} {l | l | l}
b & b & b
\end{tabular}
\label{tab:Liberty}
\caption{Training on Yosemite dataset and testing on Liberty dataset}
\end{minipage}
\end{table}
When I compile my code, I get question marks instead of correct references.

\labelafter\caption. – Thorsten Donig Feb 25 '14 at 08:55