Cognitive activity in artificial neural networks