Learning and Categorization in Modular Neural Networks