Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why don't mask during Testing? #10

Open
sev777 opened this issue Jan 19, 2023 · 0 comments
Open

Why don't mask during Testing? #10

sev777 opened this issue Jan 19, 2023 · 0 comments

Comments

@sev777
Copy link

sev777 commented Jan 19, 2023

if self.training and not self.hard_masking:

    if self.training and not self.hard_masking:
        if pruner_outputs is not None:
            threshold, pruning_scores = pruner_outputs['threshold'], pruner_outputs['scores']
            self.mask = torch.sigmoid((pruning_scores - threshold) / self.temperature)
            layer_output = layer_output * self.mask.unsqueeze(-1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant