Modal Learning in a Neural Network