Feature to prototype transition in neural networks