Accurate Classification of Two-Dimensional Spectra with Artificial Neural Networks