DNN or $k$-NN: That is the Generalize vs. Memorize Question