Skip to content

ConstantScheduler

Methods and Attributes

Bases: BaseScheduler

Scheduler that maintains a constant value.

Source code in torchebm/core/base_scheduler.py
class ConstantScheduler(BaseScheduler):
    """Scheduler that maintains a constant value."""

    def step(self) -> float:
        """Return constant value."""
        self.step_count += 1
        return self.current_value

step

step() -> float

Return constant value.

Source code in torchebm/core/base_scheduler.py
def step(self) -> float:
    """Return constant value."""
    self.step_count += 1
    return self.current_value