Skip to content

Why don't mask during Testing? #10

Description

@sev777

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions