Code for paper Learning Credit Assignment (Phys. Rev. Lett. 125, 178301 (2020) and Arxiv: 2001.03354). We put forward a model with random weight characterized by a spike massing at zero and a slab represented by a Gaussian distribution, which obtains comparable or even better performance than traditional models. A general backpropagation method (gBP) is derived out from this perspective.
Different environment may cause some functions invalid. You may need to adjust the code details according to your needs.
- python 3.7.4
- torch 1.3.1 (pytorch)
This code is the product of work carried out by the group of PMI lab, Sun Yat-sen University. If the code helps, consider giving us a shout-out in your publications.