rahulvigneswaran / Lottery-Ticket-Hypothesis-in-Pytorch

This repository contains a Pytorch implementation of the paper "The Lottery Ticket Hypothesis: Finding Sparse, Trainable Neural Networks" by Jonathan Frankle and Michael Carbin that can be easily adapted to any model/dataset.
325 stars 91 forks source link

why my experiment results can't reach the original performance? #7

Open JaminLi opened 4 years ago

JaminLi commented 4 years ago

Hi, thanks for your nice repo! When I used your method for my experiment, I found my experiment results can't reach the original performance whether the first iteration or the 35th iteration.

In

Freezing Pruned weights by making their gradients Zero

grad_tensor = np.where(tensor < EPS, 0, grad_tensor)

Does this issue?

l1teng commented 2 years ago

In my implementation, I refactored all of the NumPy operations to the PyTorch ones. It worked, and the accuracy can reach training from scratch.