  Spike-timing dependent plasticity (STDP) which observed in the brain has
proven to be important in biological learning. On the other hand, artificial
neural networks use a different way to learn, such as Back-Propagation or
Contrastive Hebbian Learning. In this work, we propose a new framework called
mstdp that learn almost the same way biological learning use, it only uses STDP
rules for supervised and unsupervised learning and don' t need a global loss or
other supervise information. The framework works like an auto-encoder by making
each input neuron also an output neuron. It can make predictions or generate
patterns in one model without additional configuration. We also brought a new
iterative inference method using momentum to make the framework more efficient,
which can be used in training and testing phases. Finally, we verified our
framework on MNIST dataset for classification and generation task.
