How many samples are needed to train a deep neural network?