Rapid identification of microbial pathogens is crucial for treating infections. Here we present a rapid method for identification of bacteria. In our method, a trained convolutional neural network classifier can accurately determine the bacterial species from a given three-dimensional refractive index image.