Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanNaren committed Feb 10, 2021
1 parent 120417c commit 7ccfdb9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pytorch_lightning/callbacks/pruning.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,13 @@ def apply_lottery_ticket_hypothesis(self):
1. Randomly initialize a neural network :math:`f(x; \theta_0)` (where :math:`\theta_0 \sim \mathcal{D}_\theta`).
2. Train the network for :math:`j` iterations, arriving at parameters :math:`\theta_j`.
3. Prune :math:`p\%` of the parameters in :math:`\theta_j`, creating a mask :math:`m`.
4. Reset the remaining parameters to their values in :math:`\theta_0`, creating the winning ticket :math:`f(x; m \odot \theta_0)`.
4. Reset the remaining parameters to their values in :math:`\theta_0`,
creating the winning ticket :math:`f(x; m \odot \theta_0)`.
This function implements the step 4.
The ``resample_parameters`` argument can be used to reset the parameters with a new :math:`\theta_z \sim \mathcal{D}_\theta`
The ``resample_parameters`` argument can be used to reset the parameters with a new
:math:`\theta_z \sim \mathcal{D}_\theta`
"""

def copy_param(new, old, name: str) -> None:
Expand Down

0 comments on commit 7ccfdb9

Please sign in to comment.