Skip to content

The clamp of DAQActivations might has a bit problem. #1

@Neilhy

Description

@Neilhy

https://github.com/mike9251/DAQ/blob/main/daq.py#L49

x_clamped[:, c, ...] = torch.clamp(x[:, c, ...], -self.alpha + self.beta[0, c, 0, 0].item(),
                                                     self.alpha + self.beta[0, c, 0, 0].item())

might be

x_clamped[:, c, ...] = torch.clamp(x[:, c, ...],  -self.alpha + self.beta[0, c, 0, 0].item() - self.step_size, 
                                                    self.alpha + self.beta[0, c, 0, 0].item())

according to paper.

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