Demonstrating the role of multiple memory mechanisms in learning patterns using neuromorphic circuits