Memorisation and forgetting in a learning Hopfield neural network: bifurcation mechanisms, attractors and basins