Memristor-based neural networks