varungohil / Generalizing-Lottery-Tickets

This repository contains code to replicate the experiments given in NeurIPS 2019 paper "One ticket to win them all: generalizing lottery ticket initializations across datasets and optimizers"
https://rescience.github.io/bibliography/Gohil_2020.html
MIT License
51 stars 9 forks source link

Understanding of train.py to find winning ticket #7

Closed Flaick closed 3 years ago

Flaick commented 3 years ago

Hello, thank you for your excellent work! I am confused about the use of train.py. It seems like the train.py only train the network on some certain dataset without any pruning. I am not sure how can I get a winning ticket initialization from that.

varungohil commented 3 years ago

Hi @Flaick

train.py helps in getting the winning ticket initialization. The paper, uses late resetting of 1, hence the winning initialization is the weights of the network after it is trained for 1 epoch. train.py logs the weights of the model for the first 5 epochs. We use the weights logged after the first epoch as the --init-path argument in iterative_pruning.py, which perform the pruning.