Bioinspired Programming of Memory Devices for Implementing an Inference Engine | Synapse